|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.InputStream java.io.FilterInputStream com.fernsroth.easyio.EasyIOInputStream
public class EasyIOInputStream
input stream for reading and writing binary data.
Field Summary |
---|
Fields inherited from class java.io.FilterInputStream |
---|
in |
Constructor Summary | |
---|---|
EasyIOInputStream(IInputStream in)
constructor. |
|
EasyIOInputStream(java.io.InputStream in)
constructor. |
Method Summary | ||
---|---|---|
|
read(T obj)
reads in a object. |
|
int |
readBits(int bits)
|
|
int |
readBits(int bits,
byte[] buffer)
read the specified number of bits from the input stream. |
|
int |
readBits(int bits,
byte[] buffer,
int offset,
int length)
read the specified number of bits from the input stream (the bits will be left aligned within the buffer). |
|
long |
readINT64()
reads a little-endien int64. |
|
int |
readUINT16()
reads a little-endien uint16. |
|
long |
readUINT32()
reads a little-endien uint32. |
|
java.math.BigInteger |
readUINT64()
reads a little-endien uint64. |
|
int |
readUINT8()
reads a uint8. |
Methods inherited from class java.io.FilterInputStream |
---|
available, close, mark, markSupported, read, read, reset, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.fernsroth.easyio.IInputStream |
---|
read, read |
Constructor Detail |
---|
public EasyIOInputStream(java.io.InputStream in)
in
- the input stream to wrap.public EasyIOInputStream(IInputStream in)
in
- the input stream.Method Detail |
---|
public <T> T read(T obj) throws EasyIOException, java.io.IOException
read
in interface IInputStream
T
- the object type.obj
- the object to read data into.
EasyIOException
java.io.IOException
public long readINT64() throws java.io.IOException
java.io.IOException
public java.math.BigInteger readUINT64() throws java.io.IOException
java.io.IOException
java.io.IOException
public long readUINT32() throws java.io.IOException
java.io.IOException
public int readUINT16() throws java.io.IOException
java.io.IOException
public int readUINT8() throws java.io.IOException
java.io.IOException
public int readBits(int bits, byte[] buffer) throws java.io.IOException
buffer
- the data array to read it into.bits
- the number of bits to read.
java.io.IOException
public int readBits(int bits, byte[] buffer, int offset, int length) throws java.io.IOException
buffer
- the data array to read it into.bits
- the number of bits to read.offset
- offset into buffer.length
- length of buffer.
java.io.IOException
public int readBits(int bits) throws java.io.IOException
bits
- number of bits to read (<=8).
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |