Name
DataInputStream
Synopsis
This subclass of InputStream
implements the methods
of the DataInput
interface, reading encoded data as
a sequence of bytes from another InputStream
. Instances
of this class can not only be created directly, but can also be obtained
from various other methods, such as the openDataInputStream
method of javax.microedition.io.Connector
. In this
case, the openDataInputStream
method returns a
stream to read data from a network connection or some other type of data source
accessed using the CLDC Generic Connection Framework.
Note that the CLDC version of this class is derived from
InputStream
and not FilterInputStream
as in J2SE. This is because CLDC does not have a
FilterInputStream
class.
public class DataInputStream extends InputStream implements DataInput { // Public Constructors public DataInputStream( InputStream in); // Public Class Methods public static final String readUTF( DataInput in) throws IOException; // Methods Implementing DataInput public final boolean readBoolean() throws IOException; public final byte readByte() throws IOException; public final char readChar() throws IOException; public final void readFully( byte[] b) throws IOException; public final void readFully(byte[] b, int off, int len) throws IOException; public final int readInt() throws IOException; public final long readLong() throws IOException; public final short readShort ...
Get J2ME in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.