ByteArrayInputStream

A ByteArrayInputStream is an InputStream that reads from a ByteArray

Since

0.1.0

Parameters

buf

The ByteArray to read from

See also

Constructors

Link copied to clipboard
constructor(buf: ByteArray, offset: Int, length: Int)
constructor(buf: ByteArray)

Properties

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

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

Returns the number of bytes that can be read from the ByteArrayInputStream

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

Marks the current position in the ByteArrayInputStream

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

Returns if the ByteArrayInputStream supports marking

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

Reads a single byte from the ByteArrayInputStream

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

Reads bytes from the ByteArrayInputStream into a ByteArray

expect open fun read(b: ByteArray): Int

Reads some number of bytes from the input stream and stores them into the buffer array b.

Link copied to clipboard
expect open fun readNBytes(n: Int): ByteArray
expect open fun readNBytes(b: ByteArray, off: Int, len: Int): Int

Returns the number of bytes that can be read (or skipped over) from this input stream without

Link copied to clipboard
open override fun reset()

Resets the ByteArrayInputStream to the last mark

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

Skips bytes in the ByteArrayInputStream

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

Returns a string representation of the ByteArrayInputStream