Package com.mckoi.database.global
Class ByteLongObject
- java.lang.Object
-
- com.mckoi.database.global.ByteLongObject
-
- All Implemented Interfaces:
BlobAccessor,java.io.Serializable
public class ByteLongObject extends java.lang.Object implements java.io.Serializable, BlobAccessor
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ByteLongObject(byte[] from)ByteLongObject(byte[] from, int offset, int length)Constructor.ByteLongObject(java.io.InputStream in, int length)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description bytegetByte(int n)Returns the byte at offset 'n' into the binary object.byte[]getByteArray()Returns the internal byte[] of this binary object.java.io.InputStreamgetInputStream()Returns an InputStream that allows us to read the entire byte long object.intlength()Returns the size of the data in this object.java.lang.StringtoString()
-
-
-
Method Detail
-
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
public java.io.InputStream getInputStream()
Returns an InputStream that allows us to read the entire byte long object.- Specified by:
getInputStreamin interfaceBlobAccessor
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-