ContentLengthInputStream

class ContentLengthInputStream : 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.

Functions

Link copied to clipboard
open fun available(): Int
Link copied to clipboard
open fun close()
Link copied to clipboard
open fun mark(readlimit: Int)
Link copied to clipboard
open fun markSupported(): Boolean
Link copied to clipboard
open fun nullInputStream(): InputStream
Link copied to clipboard
open fun obtain(other: InputStream, contentLengthHeader: String): InputStream
open fun obtain(other: InputStream, contentLength: Long): InputStream
Link copied to clipboard
open fun read(): Int
open fun read(buffer: Array<Byte>): Int
open fun read(    buffer: Array<Byte>,     byteOffset: Int,     byteCount: Int): Int
Link copied to clipboard
open fun readAllBytes(): Array<Byte>
Link copied to clipboard
open fun readNBytes(len: Int): Array<Byte>
open fun readNBytes(    b: Array<Byte>,     off: Int,     len: Int): Int
Link copied to clipboard
open fun reset()
Link copied to clipboard
open fun skip(n: Long): Long
Link copied to clipboard
open fun transferTo(out: OutputStream): Long