|
jamod at SF | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.InputStream net.wimpi.modbus.io.FastByteArrayInputStream
This class is a replacement for ByteArrayInputStream that does not synchronize every byte read.
Field Summary | |
protected byte[] |
buf
Input buffer byte[]. |
protected int |
count
Number of bytes in the input buffer. |
protected int |
mark
Marked position pointer into the input buffer. |
protected int |
pos
Actual position pointer into the input buffer. |
Constructor Summary | |
FastByteArrayInputStream(byte[] buffer)
Creates an input stream. |
|
FastByteArrayInputStream(byte[] buffer,
int offset,
int length)
Creates an input stream. |
Method Summary | |
int |
available()
|
byte[] |
getBufferBytes()
Returns the underlying data being read. |
int |
getBufferLength()
Returns the end of the buffer being read. |
int |
getBufferOffset()
Returns the offset at which data is being read from the buffer. |
void |
mark(int readlimit)
|
boolean |
markSupported()
|
int |
read()
|
int |
read(byte[] toBuf)
|
int |
read(byte[] toBuf,
int offset,
int length)
|
void |
reset()
|
long |
skip(long count)
|
Methods inherited from class java.io.InputStream |
close |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int count
protected int pos
protected int mark
protected byte[] buf
Constructor Detail |
public FastByteArrayInputStream(byte[] buffer)
buffer
- the data to read.public FastByteArrayInputStream(byte[] buffer, int offset, int length)
buffer
- the data to read.offset
- the byte offset at which to begin reading.length
- the number of bytes to read.Method Detail |
public int available()
public boolean markSupported()
public void mark(int readlimit)
public void reset()
public long skip(long count)
public int read() throws java.io.IOException
java.io.IOException
public int read(byte[] toBuf) throws java.io.IOException
java.io.IOException
public int read(byte[] toBuf, int offset, int length) throws java.io.IOException
java.io.IOException
public byte[] getBufferBytes()
public int getBufferOffset()
public int getBufferLength()
|
jamod at SF | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |