java.lang.Object | +----java.io.InputStream | +----java.io.FilterInputStream | +----java.io.DataInputStream
public class DataInputStream
extends FilterInputStream
implements DataInput
A data input stream lets an application read primitive Java data types from an underlying input stream in a machine-independent way. An application uses a data output stream to write data that can later be read by a data input stream.
Data input streams and data output streams represent Unicode strings in a format that is a slight modification of UTF-8. (For more information, see X/Open Company Ltd., "File System Safe UCS Transformation Format (FSS_UTF)", X/Open Preliminary Specification, Document Number: P316. This information also appears in ISO/IEC 10646, Annex P.)
All characters in the range '\u0001' to '\u007F' are represented by a single byte:
0 | bits 0-7 |
The null character '\u0000' and characters in the range '\u0080' to '\u07FF' are represented by a pair of bytes:
1 | 1 | 0 | bits 6-10 |
1 | 0 | bits 0-5 |
1 | 1 | 1 | 0 | bits 12-15 |
1 | 0 | bits 6-11 | ||
1 | 0 | bits 0-5 |
The two differences between this format and the "standard" UTF-8 format are the following: