DataInput

public interface DataInput
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 strings.

MUTF-8 (Modified UTF-8) Encoding

When encoding strings as UTF, implementations of DataInput and 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+10000U+10ffff are encoded as a surrogate pair, each of which is represented as a three-byte encoded value.
  • The code point U+0000 is encoded in two-byte form.

Please refer to The Unicode Standard for further information about character encoding. MUTF-8 is actually closer to the (relatively less well-known) encoding CESU-8 than to UTF-8 per se.

Public Method Summary

abstract boolean
readBoolean()
Reads a boolean.
abstract byte
readByte()
Reads an 8-bit byte value.
abstract char
readChar()
Reads a big-endian 16-bit character value.
abstract double
readDouble()
Reads a big-endian 64-bit double value.
abstract float
readFloat()
Reads a big-endian 32-bit float value.
abstra