DataOutput
interface provides for converting data from any of the Java primitive types to a series of bytes and writing these bytes to a binary stream. There is also a facility for converting a String
into modified UTF-8 format and writing the resulting series of bytes. For all the methods in this interface that write bytes, it is generally true that if a byte cannot be written for any reason, an IOException
is thrown.
@author Frank Yellin
@version 1.23, 05/23/06
@see java.io.DataInput
@see java.io.DataOutputStream
@since JDK1.0
The following features are supported:
DataOutput
converts primitive types to bytes and writes them to an underlying byte array. The DataOutput
maintains the position within the underlying byte[]. Every write call writes the value after the previous value.
The underlying byte[] is automatically resized, avoiding IOExceptions or OutOfBoundsExceptions.
This array can be retrieved by calling toByteArray().
A related {@link DataInput} should be created based on the byte[]created by a DataOutput
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|