|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.gsfc.drl.rtstps.core.Unit
public abstract class Unit
This abstract class is the base class for all units, such as packets, frames, etc.
Field Summary | |
---|---|
protected byte[] |
data
The unit's data by default is stored in this array. |
protected boolean |
deleted
When true, this unit is marked as deleted. |
protected FrameAnnotation |
frameAnnotation
All units that we use are derived from frames, so each unit has associated frame annotation. |
protected int |
length
Some units are shorter than the full data array length. |
protected int |
startOffset
Some units do not begin at byte offset zero of the data array. |
Constructor Summary | |
---|---|
protected |
Unit()
Create a unit. |
protected |
Unit(int length)
Create a unit. |
Method Summary | |
---|---|
byte[] |
getData()
Get this unit's data. |
FrameAnnotation |
getFrameAnnotation()
Get this unit's frame annotation. |
int |
getSize()
Get this unit's actual size in bytes. |
int |
getStartOffset()
Get this unit's start offset within its byte array. |
boolean |
isDeleted()
Determine if this is a deleted frame. |
void |
setDeleted(boolean d)
Mark this unit as deleted or not deleted. |
void |
setFrameAnnotation(FrameAnnotation a)
Set this unit's frame annotation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected FrameAnnotation frameAnnotation
protected byte[] data
protected int startOffset
protected int length
protected boolean deleted
Constructor Detail |
---|
protected Unit(int length)
length
- The number of bytes to be allocated to the unit.protected Unit()
Method Detail |
---|
public final int getStartOffset()
public final FrameAnnotation getFrameAnnotation()
public void setFrameAnnotation(FrameAnnotation a)
public final byte[] getData()
public final int getSize()
public void setDeleted(boolean d)
public final boolean isDeleted()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |