Class ChunkedInputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class ChunkedInputStream
    extends java.io.InputStream
    Class ChunkedInputStream implements an input stream for chunked messages
    • Constructor Summary

      Constructors 
      Constructor Description
      ChunkedInputStream​(java.io.InputStream pStream, java.lang.String pTrailerFields)
      Ctor.
      ChunkedInputStream​(java.io.InputStream pStream, java.lang.String pTrailerFields, java.lang.String pOrigin)
      Ctor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int available()  
      void close()  
      HttpHeader getTrailers()
      Return the http header trailers
      int read()  
      int read​(byte[] buf, int off, int len)  
      long skip​(long total)  
      • Methods inherited from class java.io.InputStream

        mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, transferTo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ChunkedInputStream

        public ChunkedInputStream​(java.io.InputStream pStream,
                                  java.lang.String pTrailerFields)
        Ctor.
        Parameters:
        pStream - The stream to create this one upon
        pTrailerFields - The names of trailer fields
      • ChunkedInputStream

        public ChunkedInputStream​(java.io.InputStream pStream,
                                  java.lang.String pTrailerFields,
                                  java.lang.String pOrigin)
        Ctor.
        Parameters:
        pStream - The stream to create this one upon
        pTrailerFields - The names of trailer fields
        pOrigin - The origin of the stream (response, indication request, etc.)
    • Method Detail

      • read

        public int read()
                 throws java.io.IOException
        Specified by:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] buf,
                        int off,
                        int len)
                 throws java.io.IOException
        Overrides:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • getTrailers

        public HttpHeader getTrailers()
        Return the http header trailers
        Returns:
        The trailers
      • skip

        public long skip​(long total)
                  throws java.io.IOException
        Overrides:
        skip in class java.io.InputStream
        Throws:
        java.io.IOException
      • available

        public int available()
        Overrides:
        available in class java.io.InputStream
        Returns:
        int
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.InputStream
        Throws:
        java.io.IOException