|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.planx.xmlstore.routing.TimestampedValue
public class TimestampedValue
A wrapper class that adds a timestamp to any serializable object. The object is internally represented by a byte array and can both be returned as a byte array and as an object.
| Constructor Summary | |
|---|---|
TimestampedValue(DataInput in)
|
|
TimestampedValue(Serializable obj,
long timestamp)
|
|
| Method Summary | |
|---|---|
void |
fromStream(DataInput in)
Reads the internal state of the Streamable object from the input stream. |
byte[] |
getByteArray()
Returns the value as a byte array. |
Serializable |
getObject()
Returns the value as an Object. |
long |
timestamp()
|
void |
toStream(DataOutput out)
Writes the internal state of the Streamable object to the output stream in a format that can later be read by the same Streamble class using the Streamable.fromStream(java.io.DataInput) method. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TimestampedValue(Serializable obj,
long timestamp)
throws IOException
IOException
public TimestampedValue(DataInput in)
throws IOException
IOException| Method Detail |
|---|
public void fromStream(DataInput in)
throws IOException
StreamableUnsupportedOperationException,
and instead implement a constructor as described above.
fromStream in interface StreamableIOException
public void toStream(DataOutput out)
throws IOException
StreamableStreamable.fromStream(java.io.DataInput) method.
toStream in interface StreamableIOExceptionpublic long timestamp()
public byte[] getByteArray()
public Serializable getObject()
throws IOException
IOExceptionpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||