Package com.mckoi.database.global
Class ByteLongObject
java.lang.Object
com.mckoi.database.global.ByteLongObject
- All Implemented Interfaces:
BlobAccessor,Serializable
A byte array that can be transferred between the client and server. This
is used for transferring BLOB data to/from the database engine.
- Author:
- Tobias Downer
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionByteLongObject(byte[] from) ByteLongObject(byte[] from, int offset, int length) Constructor.ByteLongObject(InputStream in, int length) -
Method Summary
Modifier and TypeMethodDescriptionbytegetByte(int n) Returns the byte at offset 'n' into the binary object.byte[]Returns the internal byte[] of this binary object.Returns an InputStream that allows us to read the entire byte long object.intlength()Returns the size of the data in this object.toString()
-
Constructor Details
-
ByteLongObject
public ByteLongObject(byte[] from, int offset, int length) Constructor. -
ByteLongObject
public ByteLongObject(byte[] from) -
ByteLongObject
- Throws:
IOException
-
-
Method Details
-
length
public int length()Returns the size of the data in this object.- Specified by:
lengthin interfaceBlobAccessor
-
getByte
public byte getByte(int n) Returns the byte at offset 'n' into the binary object. -
getByteArray
public byte[] getByteArray()Returns the internal byte[] of this binary object. Care needs to be taken when handling this object because altering the contents will change this object. -
getInputStream
Returns an InputStream that allows us to read the entire byte long object.- Specified by:
getInputStreamin interfaceBlobAccessor
-
toString
-