Kactoos

kactoos-jvm / nnl.rocks.kactoos.io / HeadInputStream

HeadInputStream

class HeadInputStream : InputStream

Input stream that only shows the first N bytes of the original stream.

There is no thread-safety guarantee.

Parameters

origin - The original input stream.

len - A number of bytes that can be read from the beginning.

Since 0.4

Constructors

Name Summary
<init> HeadInputStream(origin: InputStream, length: Long)
Input stream that only shows the first N bytes of the original stream.

Functions

Name Summary
available fun available(): Int
close fun close(): Unit
mark fun mark(readlimit: Int): Unit
markSupported fun markSupported(): Boolean
read fun read(): Int
reset fun reset(): Unit
skip fun skip(skip: Long): Long