|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ostore.util.InputBufferImpl | +--ostore.network.NetworkInputBuffer
Implements the InputBuffer interface as a linked list of ATcpInPacket objects.
Constructor Summary | |
---|---|
NetworkInputBuffer(long next_seq_num)
|
Method Summary | |
---|---|
void |
add_packet(ATcpInPacket packet)
|
Object |
clone()
Buffers must support clone such that the read pointer on a cloned buffer is independent of the original. |
void |
convertToBytes(byte[][] out_buffer,
int[][] out_offset)
|
byte |
nextByte()
Read the next byte out of the buffer. |
void |
nextBytes(byte[] out_buffer,
int out_offset,
int count)
Read the next length bytes out the of the buffer, and
place them in the array output , starting at index
offset . |
void |
nextBytes(OutputBuffer output)
Write all of the remaining bytes in this input buffer into the given output buffer. |
void |
skipBytes(int count)
|
InputBuffer |
subBuffer(int count)
Create a new input buffer from the read point at this one, containing the next length bytes. |
String |
toString()
|
Methods inherited from class ostore.util.InputBufferImpl |
---|
nextBigInteger, nextBigInteger, nextBoolean, nextBoolean, nextDouble, nextDouble, nextInt, nextInt, nextLong, nextLong, nextObject, nextObject, nextShort, nextShort, nextString, nextString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public NetworkInputBuffer(long next_seq_num)
Method Detail |
public Object clone() throws CloneNotSupportedException
InputBuffer
clone
in interface InputBuffer
clone
in class InputBufferImpl
CloneNotSupportedException
public void convertToBytes(byte[][] out_buffer, int[][] out_offset)
public byte nextByte()
InputBuffer
public void nextBytes(byte[] out_buffer, int out_offset, int count)
InputBuffer
length
bytes out the of the buffer, and
place them in the array output
, starting at index
offset
.
out_buffer
- the array into which the bytes are writtenout_offset
- the index in output
at which we start
writing bytescount
- the number of bytes to readpublic void skipBytes(int count)
public void nextBytes(OutputBuffer output)
InputBuffer
RouteMsg
doesn't have to be
deserialized on an intermediate node in its path. I'm not entirely
happy with the idea, though, so please don't use it for now without
talking to me first about what you're using it for.
output
- the output buffer into which the bytes are writtenpublic InputBuffer subBuffer(int count)
InputBuffer
public void add_packet(ATcpInPacket packet)
public String toString()
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |