verinec.netsim.util.tables
Class SlidingWindowByteBuffer
java.lang.Object
verinec.netsim.util.tables.SlidingWindowByteBuffer
public class SlidingWindowByteBuffer
- extends Object
A sliding window buffer reading bytes from a SlidingWindowPacketBuffer
- Version:
- $Revision: 47 $
- Author:
- Dominik Jungo
|
Method Summary |
byte |
get()
reads one byte a packet from the SlidingWindowPacketBuffer and removes
the byte from it's payload. |
SlidingWindowPacketBuffer |
getPacketBuffer()
gets the SlidingWindowPacketBuffer from which this buffer reads it's
Packets. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pBuffer
private SlidingWindowPacketBuffer pBuffer
jlogger
private Logger jlogger
SlidingWindowByteBuffer
public SlidingWindowByteBuffer(SlidingWindowPacketBuffer pBuffer)
- Creates a new buffer
- Parameters:
pBuffer - a buffer from which bytes contained as payload in packets are
read
get
public byte get()
throws NetSimException
- reads one byte a packet from the SlidingWindowPacketBuffer and removes
the byte from it's payload. If the Packet is empty it's removes from the
SlidingWindowPacketBuffer.
- Returns:
- the next byte from the buffer
- Throws:
NetSimException - if the data can't be read. this means that the buffer is
either empty or there is a gap (missing packet) to the next
byte/packet.
getPacketBuffer
public SlidingWindowPacketBuffer getPacketBuffer()
- gets the SlidingWindowPacketBuffer from which this buffer reads it's
Packets.
- Returns:
- the SlidingWindowPacketBuffer from which this buffer reads it's
Packets