|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmil.navy.nps.dis.PduElement
mil.navy.nps.dis.FixedDatum
Special data record subclass of PDUElement.
This is a subclass of the PduElement class, the abstract class that all parts of a PDU inherit from. It knows how to serialize, deserialize, and clone itself. It is described on pp 108-109 in the DIS standard.
PduElement| Field Summary | |
protected int |
fixedDatumID
The fixed datum id shall be represented by a 32-bit enumeration. |
static int |
sizeOf
Constant value--size of a Fixed Datum Record; here : sizeOf = 8 bytes. |
protected int |
value
This field shall specify the value of fixed datum indicated by the fixed datum types. |
| Constructor Summary | |
FixedDatum()
Default constructor--fills with zeros for all values. |
|
FixedDatum(int pFixedDatumID,
int pValue)
Constructs a new FixedDatum with the values specfied in parameters. |
|
| Method Summary | |
java.lang.Object |
clone()
Makes deep copies of all the instance variables, so we don't have two objects pointing to the same data. |
void |
deSerialize(java.io.DataInputStream inputStream)
Deserialize our data from the input stream. |
int |
getFixedDatumID()
|
int |
getValue()
|
int |
length()
Returns the length of the object when serialized in a stream. |
void |
printValues(int indentLevel,
java.io.PrintStream printStream)
Prints the generated serialized object for debugging. |
void |
serialize(java.io.DataOutputStream outputStream)
Serialize our data out to the stream. |
void |
setFixedDatumID(int pFixedDatumID)
|
void |
setValue(int pValue)
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int fixedDatumID
protected int value
public static final int sizeOf
sizeOf = 8 bytes.
| Constructor Detail |
public FixedDatum()
public FixedDatum(int pFixedDatumID,
int pValue)
pFixedDatumID - the value of fixed Datum IdentifierpValue - the value of the Fixed Datum| Method Detail |
public java.lang.Object clone()
PduElement
clone in class PduElementObjectpublic void serialize(java.io.DataOutputStream outputStream)
PduElementsuper.Serialize() to make sure
the superclasse's data is serialized out. The order
in which instance variables are serialized is significant. They must
be serialized in the same order they appear in the DIS
spec.
Prints out some information during execution if debugging flag is set.
serialize in interface SerializationInterfaceserialize in class PduElementoutputStream - the stream to which this object is serialized
java.lang.RuntimeException - when IO Error occurs.public void deSerialize(java.io.DataInputStream inputStream)
PduElementsuper.deSerialize to make sure
the superclass's data are properly affected. The order
in which instance variables are serialized is significant. They must
be deSerialized in the same order as they have been serialized as specified by the DIS spec.
deSerialize in interface SerializationInterfacedeSerialize in class PduElementinputStream - the stream from which this object is initialized
java.lang.RuntimeException - when IO Error occurs.public int length()
PduElement
length in class PduElement
public void printValues(int indentLevel,
java.io.PrintStream printStream)
PduElement
printValues in class PduElementindentLevel - number of spaces to indent for visibilitypublic int getFixedDatumID()
public void setFixedDatumID(int pFixedDatumID)
public int getValue()
public void setValue(int pValue)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||