Package com.mckoi.database.global
Class StreamableObject
java.lang.Object
com.mckoi.database.global.StreamableObject
An object that is streamable (such as a long binary object, or
a long string object). This is passed between client and server and
contains basic primitive information about the object it represents. The
actual contents of the object itself must be obtained through other
means (see com.mckoi.database.jdbc.DatabaseInterface).
- Author:
- Tobias Downer
-
Constructor Summary
ConstructorsConstructorDescriptionStreamableObject
(byte type, long size, long id) Constructs the StreamableObject. -
Method Summary
-
Constructor Details
-
StreamableObject
public StreamableObject(byte type, long size, long id) Constructs the StreamableObject.
-
-
Method Details
-
getType
public byte getType()Returns the type of object this stub represents. Returns 1 if it represents 2-byte unicde character object, 2 if it represents binary data. -
getSize
public long getSize()Returns the size of the object stream, or -1 if the size is unknown. If this represents a unicode character string, you would calculate the total characters as size / 2. -
getIdentifier
public long getIdentifier()Returns an identifier that can identify this object within some context. For example, if this is a streamable object on the client side, then the identifier might be the value that is able to retreive a section of the streamable object from the DatabaseInterface.
-