Package org.postgresql.util
Interface PGBinaryObject
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
lengthInBytes()
This method is called to return the number of bytes needed to store this object in the binary form required by org.postgresql.void
setByteValue(byte[] value, int offset)
This method is called to set the value of this object.void
toBytes(byte[] bytes, int offset)
This method is called the to store the value of the object, in the binary form required by org.postgresql.
-
-
-
Method Detail
-
setByteValue
void setByteValue(byte[] value, int offset) throws java.sql.SQLException
This method is called to set the value of this object.- Parameters:
value
- data containing the binary representation of the value of the objectoffset
- the offset in the byte array where object data starts- Throws:
java.sql.SQLException
- thrown if value is invalid for this type
-
lengthInBytes
int lengthInBytes()
This method is called to return the number of bytes needed to store this object in the binary form required by org.postgresql.- Returns:
- the number of bytes needed to store this object
-
toBytes
void toBytes(byte[] bytes, int offset)
This method is called the to store the value of the object, in the binary form required by org.postgresql.- Parameters:
bytes
- the array to store the value, it is guaranteed to be at lestlengthInBytes()
in size.offset
- the offset in the byte array where object must be stored
-
-