thinkmap.datasource.stream
Class BinaryStreamFormat
java.lang.Object
thinkmap.datasource.stream.BinaryStreamFormat
- All Implemented Interfaces:
- IStreamFormat
public class BinaryStreamFormat
- extends Object
- implements IStreamFormat
This class implements the default stream format for the Thinkmap
RemoteDataSource. It is a compact binary format that does not use
serialization and is only capable of sending primative objects over the
wire. The objects it supports are String, any instance of Number,
Character, Boolean, and Date.
It also houses a number of constants that are used by both the
BinaryStreamWriter and the BinaryStreamReader
- Version:
- $Revision: 1.3 $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MIME_TYPE
public static final String MIME_TYPE
- See Also:
- Constant Field Values
BEGIN_MESSAGE
public static final byte BEGIN_MESSAGE
- See Also:
- Constant Field Values
ATTRIBUTE
public static final byte ATTRIBUTE
- See Also:
- Constant Field Values
BEGIN_ENTITY
public static final byte BEGIN_ENTITY
- See Also:
- Constant Field Values
END_ENTITY
public static final byte END_ENTITY
- See Also:
- Constant Field Values
BEGIN_ENTITY_MD
public static final byte BEGIN_ENTITY_MD
- See Also:
- Constant Field Values
END_ENTITY_MD
public static final byte END_ENTITY_MD
- See Also:
- Constant Field Values
PROPERTY
public static final byte PROPERTY
- See Also:
- Constant Field Values
PROPERTY_MD
public static final byte PROPERTY_MD
- See Also:
- Constant Field Values
BEGIN_ID
public static final byte BEGIN_ID
- See Also:
- Constant Field Values
ID_KEY
public static final byte ID_KEY
- See Also:
- Constant Field Values
ID_KEY_MD
public static final byte ID_KEY_MD
- See Also:
- Constant Field Values
END_ID
public static final byte END_ID
- See Also:
- Constant Field Values
BEGIN_RELATED_LIST
public static final byte BEGIN_RELATED_LIST
- See Also:
- Constant Field Values
END_RELATED_LIST
public static final byte END_RELATED_LIST
- See Also:
- Constant Field Values
BEGIN_RELATED_ENTITY
public static final byte BEGIN_RELATED_ENTITY
- See Also:
- Constant Field Values
END_RELATED_ENTITY
public static final byte END_RELATED_ENTITY
- See Also:
- Constant Field Values
END_MESSAGE
public static final byte END_MESSAGE
- See Also:
- Constant Field Values
ERROR
public static final byte ERROR
- See Also:
- Constant Field Values
FATAL_ERROR
public static final byte FATAL_ERROR
- See Also:
- Constant Field Values
OBJ_ARRAY
public static final byte OBJ_ARRAY
- See Also:
- Constant Field Values
OBJ_UNKNOWN
public static final byte OBJ_UNKNOWN
- See Also:
- Constant Field Values
OBJ_NULL
public static final byte OBJ_NULL
- See Also:
- Constant Field Values
OBJ_DATE
public static final byte OBJ_DATE
- See Also:
- Constant Field Values
OBJ_STRING
public static final byte OBJ_STRING
- See Also:
- Constant Field Values
OBJ_BOOLEAN
public static final byte OBJ_BOOLEAN
- See Also:
- Constant Field Values
OBJ_BYTE
public static final byte OBJ_BYTE
- See Also:
- Constant Field Values
OBJ_CHAR
public static final byte OBJ_CHAR
- See Also:
- Constant Field Values
OBJ_DOUBLE
public static final byte OBJ_DOUBLE
- See Also:
- Constant Field Values
OBJ_FLOAT
public static final byte OBJ_FLOAT
- See Also:
- Constant Field Values
OBJ_INTEGER
public static final byte OBJ_INTEGER
- See Also:
- Constant Field Values
OBJ_LONG
public static final byte OBJ_LONG
- See Also:
- Constant Field Values
OBJ_SHORT
public static final byte OBJ_SHORT
- See Also:
- Constant Field Values
OBJ_CLASS
public static final byte OBJ_CLASS
- See Also:
- Constant Field Values
MAJOR_VERSION
public static final byte MAJOR_VERSION
- See Also:
- Constant Field Values
MINOR_VERSION
public static final byte MINOR_VERSION
- See Also:
- Constant Field Values
TM_IDENTIFIER
public static final String TM_IDENTIFIER
- See Also:
- Constant Field Values
reader
protected IStreamReader reader
BinaryStreamFormat
public BinaryStreamFormat()
getStreamWriter
public StreamWriter getStreamWriter(IStreamFactory factory)
- Description copied from interface:
IStreamFormat
- Produce a new StreamWriter for this StreamFactory. The StreamFactory is
usually passed to the constructor of the StreamWriter, so that it can
aquire a stream to write to.
- Specified by:
getStreamWriter in interface IStreamFormat
- Parameters:
factory - the factory that is producing the stream.
- Returns:
- stream writer
getStreamReader
public IStreamReader getStreamReader(IStreamFactory factory)
- Description copied from interface:
IStreamFormat
- Produce a new StreamReader for this StreamFactory.
- Specified by:
getStreamReader in interface IStreamFormat
- Parameters:
factory - the factory that is producing the stream.
- Returns:
- stream reader
getMimeType
public String getMimeType()
- Get the mime-type of this stream format: "application/x-thinkmap-2.0"
- Specified by:
getMimeType in interface IStreamFormat
- Returns:
- "application/x-thinkmap-2.0"
Copyright © 2013 Thinkmap, Inc. All Rights Reserved.