DataInputStream

A DataInputStream is a InputStream that can read data from a InputStream

Since

0.1.0

Parameters

data

The InputStream to read from

Constructors

Link copied to clipboard
constructor(data: InputStream)

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 this input stream without blocking.

Link copied to clipboard
open override fun close()

Closes this input stream and releases any system resources associated with the stream.

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

Marks the current position in this input stream.

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

Tests if this input stream supports the mark and reset methods.

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

Reads the next byte of data from the input stream.

open override fun read(b: ByteArray): Int

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

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

Reads up to len bytes of data from the input stream into an array of bytes.

Link copied to clipboard
fun readByte(): Byte

Reads the next byte of data from the input stream.

Link copied to clipboard

Reads a single double from the InputStream.

Link copied to clipboard

Reads a single float from the InputStream.

Link copied to clipboard
fun readInt(): Int

Reads a single int from the InputStream.

Link copied to clipboard
fun readLong(): Long

Reads a single long from the InputStream.

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

Reads a single short from the InputStream.

Link copied to clipboard

Reads a single boolean from the InputStream.

Link copied to clipboard

Reads a single unsigned int from the InputStream.

Link copied to clipboard

Reads a single unsigned long from the InputStream.

Link copied to clipboard

Reads a single unsigned short from the InputStream.

Link copied to clipboard
fun readUTF(length: Int): String

Reads UTF-8 encoded string from the InputStream.

Link copied to clipboard
open override fun reset()

Repositions this stream to the position at the time the mark method was last called on this input stream.

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

Skips over and discards n bytes of data from this input stream.