|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jcontrol.io.InputStream jcontrol.io.DataInputStream jcontrol.io.GenericDataInputStream
public class GenericDataInputStream
Field Summary | |
---|---|
protected int |
m_endianess
The stream's endianess. |
protected InputStream |
m_in
The underlying InputStream. |
Fields inherited from class jcontrol.io.DataInputStream |
---|
BIG_ENDIAN, LITTLE_ENDIAN |
Constructor Summary | |
---|---|
protected |
GenericDataInputStream(InputStream in,
int endianess)
|
Method Summary | |
---|---|
int |
available()
Returns the number of bytes immediately available for reading from this stream. |
void |
close()
Closes the stream. |
void |
mark(int readlimit)
|
boolean |
markSupported()
Checks if mark() and reset() are supported
by this stream. |
int |
read()
Reads a single byte from the stream. |
void |
read(byte[] b,
int start,
int length)
Reads an array of bytes from the stream. |
boolean |
readBoolean()
Reads a boolean value, represented by a byte value of 0 (false)
of 1 (true), from the stream. |
char |
readChar()
Reads a char value from the stream. |
double |
readDouble()
Reads a double value from the stream. |
float |
readFloat()
Reads a float value from the stream. |
int |
readInt()
Reads an int value from the stream. |
long |
readLong()
Reads a long value from the stream. |
short |
readShort()
Reads a short value from the stream. |
void |
reset()
|
void |
skip(int length)
Skips data from the stream. |
Methods inherited from class jcontrol.io.DataInputStream |
---|
createDataInputStream, createDataInputStream |
Methods inherited from class jcontrol.io.InputStream |
---|
read |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, notifyAll, toString, wait |
Field Detail |
---|
protected InputStream m_in
protected int m_endianess
Constructor Detail |
---|
protected GenericDataInputStream(InputStream in, int endianess)
Method Detail |
---|
public boolean readBoolean() throws IOException
DataInputStream
boolean
value, represented by a byte value of 0
(false)
of 1
(true), from the stream.
readBoolean
in class DataInputStream
IOException
- occurs on I/O error or when the stream is closedpublic char readChar() throws IOException
DataInputStream
char
value from the stream.
readChar
in class DataInputStream
IOException
- occurs on I/O error or when the stream is closedpublic double readDouble() throws IOException
DataInputStream
double
value from the stream.
readDouble
in class DataInputStream
IOException
- occurs on I/O error or when the stream is closedpublic float readFloat() throws IOException
DataInputStream
float
value from the stream.
readFloat
in class DataInputStream
IOException
- occurs on I/O error or when the stream is closedpublic int readInt() throws IOException
DataInputStream
int
value from the stream.
readInt
in class DataInputStream
IOException
- occurs on I/O error or when the stream is closedpublic long readLong() throws IOException
DataInputStream
long
value from the stream.
readLong
in class DataInputStream
IOException
- occurs on I/O error or when the stream is closedpublic short readShort() throws IOException
DataInputStream
short
value from the stream.
readShort
in class DataInputStream
IOException
- occurs on I/O error or when the stream is closedpublic int available() throws IOException
InputStream
available
in class InputStream
IOException
- occurs on I/O errors or when the stream is closedpublic void close() throws IOException
InputStream
close
in class InputStream
IOException
- if stream is already closedpublic void mark(int readlimit)
mark
in class InputStream
public boolean markSupported()
InputStream
mark()
and reset()
are supported
by this stream.
markSupported
in class InputStream
public int read() throws IOException
InputStream
read
in class InputStream
IOException
- occurs on I/O errors or when the stream is closedpublic void read(byte[] b, int start, int length) throws IOException
InputStream
read
in class InputStream
b
- array where data is storedstart
- offset within the data arraylength
- number of bytes to read
IOException
- occurs on I/O errors or when the stream is closedpublic void reset() throws IOException
reset
in class InputStream
IOException
public void skip(int length) throws IOException
InputStream
skip
in class InputStream
length
- number of bytes to skip
IOException
- occurs on I/O errors or when the stream is closed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |