Package 

Class ContentLengthInputStream

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

    
    public final class ContentLengthInputStream
    extends FilterInputStream
                        

    Uses the content length as the basis for the return value of available and verifies that at least content length bytes are returned from the various read methods.

    • Method Summary

      Modifier and Type Method Description
      static InputStream obtain(@NonNull() InputStream other, @Nullable() String contentLengthHeader)
      static InputStream obtain(@NonNull() InputStream other, long contentLength)
      synchronized int available()
      synchronized int read()
      int read(Array<byte> buffer)
      synchronized int read(Array<byte> buffer, int byteOffset, int byteCount)
      • Methods inherited from class java.io.FilterInputStream

        available, close, mark, markSupported, read, reset, skip
      • Methods inherited from class java.io.InputStream

        nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait