public class Utilities extends Object
Constructor and Description |
---|
Utilities() |
Modifier and Type | Method and Description |
---|---|
static MsgRepository |
createRepository(String name)
Instantiates a MsgRepository object suitable for encapsulating protocol data.
|
static Msg |
deserializeMsg(byte[] buffer,
int offset,
int length)
De-serializes the given byte stream back into a Msg.
|
protected static String |
deserializeVersion(String version)
Serializes the given Msg into a byte stream.
|
static byte[] |
serializeMsg(Msg msg)
Serializes the given Msg into a byte stream.
|
protected static String |
serializeVersion(String version)
Serializes the given Msg into a byte stream.
|
public static byte[] serializeMsg(Msg msg)
msg
- the Msg object to be serializedpublic static Msg deserializeMsg(byte[] buffer, int offset, int length) throws TraceException
buffer
- the byte stream to be de-serializedoffset
- the offset into the byte stream to begin de-serializationlength
- the length of the byte stream to de-serializeTraceException
public static MsgRepository createRepository(String name) throws TraceException
name
- the path to the recording file (example '/testproj/test1.recmodel')TraceException
protected static String serializeVersion(String version)
version
- the Msg object to be serializedprotected static String deserializeVersion(String version)
version
- the Msg object to be serialized© Copyright IBM Corp. 2013. All rights reserved.