Java Reference
In-Depth Information
Appendix A. Class Library: CLDC Packages
IN THIS APPENDIX
This appendix gives an overview of the API provided in the
Connected Limited Device
Configuration (CLDC) version 1.0 and version 1.1 also called CLDC Next Generation (NG).
It
also lists profile-related additions to the configurations.
The java.io Package
The
java.io
package contains all the interfaces, classes, and exceptions that provide a mechanism
for system input and output through data streams.
Interfaces
DataInput
The
DataInput
interface provides methods for reading binary streams and
converting them into Java primitive data types.
DataOutput
The
DataOutput
interface provides methods for writing/converting Java
p
rimitive data types to a binary stream.
Classes
ByteArrayInputStream
The
ByteArrayInputStream
encapsulates an
InputStream
that uses a byte array as a buffer that might be read from a
s
tream.
ByteArrayOutputStream
The
ByteArrayOutputStream
provides an
OutputStream
t
hat might be used to write data to a byte array.
DataInputStream
The
DataInputStream
implements the
DataInput
interface
and provides methods to read primitive Java data types from a
s
tream.
DataOutputStream
The
DataOutputStream
implements the
DataOutput
interface and provides methods to write primitive Java data
t
ypes to a stream.
InputStream
The
InputStream
is the abstract superclass of all byte-related
i
nput streams.
InputStreamReader
The
InputStreamReader
closes the gap between byte-related
input streams and character-related input streams. Bytes that
a
re read using this class are internally converted to characters.
OutputStream
The
OutputStream
is the abstract superclass of all byte-
r
elated output streams.
Search WWH ::
Custom Search