Known Indirect Subclasses
Defines an interface for classes that are able to read big-endian typed data from some
source. Typically, this data has been written by a class which implements
DataOutput. 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 MUTF-8
MUTF-8 (Modified UTF-8) Encoding
When encoding strings as UTF, implementations of
DataOutput use a slightly modified form of UTF-8, hereafter referred
to as MUTF-8. This form is identical to standard UTF-8, except:
- Only the one-, two-, and three-byte encodings are used.
- Code points in the range
U+10ffffare encoded as a surrogate pair, each of which is represented as a three-byte encoded value.
- The code point
U+0000is encoded in two-byte form.
Reads a boolean.
Reads an 8-bit byte value.
Reads a big-endian 16-bit character value.
Reads a big-endian 64-bit double value.
Reads a big-endian 32-bit float value.
readFully(byte dst, int offset, int byteCount)
Reads a big-endian 32-bit integer value.
Returns a string containing the next line of text available from this stream.
Reads a big-endian 64-bit long value.
Reads a big-endian 16-bit short value.
Reads a string encoded with
Reads an unsigned 8-bit byte value and returns it as an int.
Reads a big-endian 16-bit unsigned short value and returns it as an int.
public abstract boolean readBoolean ()
public abstract byte readByte ()
public abstract char readChar ()
public abstract double readDouble ()
public abstract float readFloat ()
public abstract void readFully (byte dst)
readFully(dst, 0, dst.length);.
public abstract void readFully (byte dst, int offset, int byteCount)
byteCount bytes from this stream and stores them in the byte
dst starting at
byteCount is zero, then this
method returns without reading any bytes. Otherwise, this method blocks until
byteCount bytes have been read. If insufficient bytes are available,
EOFException is thrown. If an I/O error occurs,
thrown. When an exception is thrown, some bytes may have been consumed from the stream
and written into the array.
|dst||the byte array into which the data is read.|
|offset||the offset in
|byteCount||the number of bytes to read.|
public abstract int readInt ()
public abstract String readLine ()
Returns a string containing the next line of text available from this
stream. A line is made of zero or more characters followed by
"\r\n" or the end of the stream. The string
does not include the newline sequence.
- the contents of the line or null if no characters have been read before the end of the stream.