CountingInputStream

This class is an input stream that reads from another input stream and counts the read bytes

Since

0.1.0

Parameters

data

The input stream to count the read bytes from

Constructors

Link copied to clipboard
constructor(data: InputStream)

Creates a new CountingInputStream

Properties

Link copied to clipboard

Returns a BufferedInputStream that reads from this input stream.

Link copied to clipboard

The count of read bytes from the input stream

Link copied to clipboard
val count: Long

The count of read bytes from the input stream

Link copied to clipboard

Returns a CountingInputStream that reads from this input stream.

Link copied to clipboard

Returns a DataInputStream that reads from this input stream.

Link copied to clipboard

The count of read operations from the input stream

Link copied to clipboard

Returns a BufferedInputStream that reads from this input stream.

Functions

Link copied to clipboard

Returns a BufferedInputStream that reads from this input stream.

Link copied to clipboard

Returns a CountingInputStream that reads from this input stream.

Link copied to clipboard

Returns a DataInputStream that reads from this input stream.

Link copied to clipboard
open override fun available(): Int

Gets the number of bytes that can be read from the input stream without blocking and without increasing the count

Link copied to clipboard
open override fun close()

Closes the input stream

Link copied to clipboard
open override fun mark(readlimit: Int)

Marks the current position in the input stream

Link copied to clipboard
open override fun markSupported(): Boolean

Checks if the input stream supports marking/resetting

Link copied to clipboard
open override fun read(): Int

Reads a single byte from the input stream and increases the count by one

open override fun read(b: ByteArray): Int
open override fun read(b: ByteArray, off: Int, len: Int): Int

Reads bytes from the input stream and increases the count by the number of read bytes

Link copied to clipboard
open override fun readNBytes(n: Int): ByteArray

Reads bytes from the input stream and increases the count by the number of read bytes

open override fun readNBytes(b: ByteArray, off: Int, len: Int): Int

Reads bytes from the input streamand increases the count by the number of read bytes

Link copied to clipboard
open override fun reset()

Resets the input stream to the last marked position

Link copied to clipboard
open override fun skip(n: Long): Long

Skips bytes from the input stream and increases the count by the number of skipped bytes

Link copied to clipboard
open override fun toString(): String