|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sag.osami.context.recorder.storage.ContextEventData
public final class ContextEventData
This class wraps reading and writing of context events from and to streams in a machine-independent manner.
DataInputStream
and DataOutputStream
are used for this, the exact format for one context event is
described below:
UTF8-String | UTF8-String | long | UTF8-String | (UTF8-String) |
---|---|---|---|---|
Context origin | Context type | Context (UNIX-)timestamp | class name of payload or empty string, if no payload | serialized payload data (but only if payload class name was not empty) |
Method Summary | |
---|---|
static ContextEvent |
read(java.io.DataInputStream in)
Reads a context event from a DataInputStream . |
static void |
write(java.io.DataOutputStream out,
ContextEvent ctxEvent)
Writes a context event to a DataOutputStream . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ContextEvent read(java.io.DataInputStream in) throws java.io.IOException
DataInputStream
.
in
- the input stream
java.io.IOException
- on I/O errors
java.io.EOFException
- when the end of the input stream was reachedpublic static void write(java.io.DataOutputStream out, ContextEvent ctxEvent) throws java.io.IOException
DataOutputStream
.
out
- the output streamctxEvent
- the context event to be written
java.io.IOException
- on I/O errors
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |