DataInputStream

public class DataInputStream extends FilterInputStream
implements DataInput

Wraps an existing InputStream and reads big-endian typed data from it. Typically, this stream has been written by a DataOutputStream. Types that can be read include byte, 16-bit short, 32-bit int, 32-bit float, 64-bit long, 64-bit double, byte strings, and strings encoded in modified UTF-8.

See Also

Inherited Field Summary

Public Constructor Summary

DataInputStream(InputStream in)
Constructs a new DataInputStream on the InputStream in.

Public Method Summary

final int
read(byte[] buffer)
Reads up to byte.length bytes of data from this input stream into an array of bytes.
final int
read(byte[] buffer, int byteOffset, int byteCount)
Reads up to len bytes of data from this input stream into an array of bytes.
final boolean
readBoolean()
Reads a boolean.
final byte
readByte()
Reads an 8-bit byte value.
final char
readChar()
Reads a big-endian 16-bit character value.
final double