Java Reference
In-Depth Information
20.6. The Data Byte Streams
Reading and writing text characters is useful, but you also frequently
need to transmit the binary data of specific types across a stream. The
DataInput and DataOutput interfaces define methods that transmit primitive
types across a stream. The classes DataInputStream and DataOutputStream
provide a default implementation for each interface. We cover the inter-
faces first, followed by their implementations.
20.6.1. DataInput and DataOutput
The interfaces for data input and output streams are almost mirror im-
ages. The parallel read and write methods for each type are
Read
Write
Type
readBoolean
writeBoolean
boolean
readChar
writeChar
char
readByte
writeByte
byte
readShort
writeShort
short
readInt
writeInt
int
readLong
writeLong
long
 
Search WWH ::




Custom Search