|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.gsfc.drl.rtstps.core.ccsds.path.PacketZone
final class PacketZone
This class contains the packet zone part of a VCDU. We use it in packet reassembly to move bytes to packets and to maintain our current location within the packet zone. It does not contain the first header pointer. This class is reuseable.
Field Summary | |
---|---|
private byte[] |
data
|
private int |
index
|
private int |
remainingBytes
|
private int |
zoneEnd
|
private int |
zoneStart
|
Constructor Summary | |
---|---|
PacketZone()
|
Method Summary | |
---|---|
(package private) void |
advance(int bytes)
Advance the current location. |
(package private) void |
clear()
Empty the zone. |
(package private) int |
getRemainingByteCount()
Get the number of remaining bytes in the zone. |
(package private) int |
getWord(int offset)
Get a 16-bit word from the zone starting at a byte offset from the current index. |
(package private) int |
moveRemainderTo(byte[] target,
int start)
Move all remaining bytes to a target buffer. |
(package private) void |
moveTo(byte[] target,
int start,
int length)
Move some packet zone bytes (starting at the current zone index) to a target buffer. |
(package private) void |
reload(byte[] data,
int start,
int end)
Use this method to load a new packet zone into this class. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private byte[] data
private int zoneStart
private int zoneEnd
private int index
private int remainingBytes
Constructor Detail |
---|
PacketZone()
Method Detail |
---|
void reload(byte[] data, int start, int end)
data
- The byte array that contains the packet zone.start
- Index of the beginning byte of the packet zone. Skip the
first header pointer.end
- Index of the last byte of the packet zone.final int getRemainingByteCount()
final void clear()
void moveTo(byte[] target, int start, int length)
int moveRemainderTo(byte[] target, int start)
final int getWord(int offset)
final void advance(int bytes)
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |