Package org.apache.derby.iapi.types
Class SQLClob.HeaderInfo
java.lang.Object
org.apache.derby.iapi.types.SQLClob.HeaderInfo
- Enclosing class:
SQLClob
Holder class for header information gathered from the raw byte header in
the stream.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
The header length in bytes.private final int
The value length, either in bytes or characters. -
Constructor Summary
ConstructorsConstructorDescriptionHeaderInfo
(int headerLength, int valueLength) Creates a new header info object. -
Method Summary
Modifier and TypeMethodDescription(package private) int
Returns the byte length encoded in the header, if any.(package private) int
Returns the character length encoded in the header, if any.(package private) int
Returns the header length in bytes.(package private) boolean
Tells whether the encoded length was in characters or bytes.toString()
Returns a textual representation.
-
Field Details
-
valueLength
private final int valueLengthThe value length, either in bytes or characters. -
headerLength
private final int headerLengthThe header length in bytes.
-
-
Constructor Details
-
HeaderInfo
HeaderInfo(int headerLength, int valueLength) Creates a new header info object.- Parameters:
headerLength
- the header length in bytesvalueLength
- the value length (chars or bytes)
-
-
Method Details
-
headerLength
int headerLength()Returns the header length in bytes.- Returns:
- Number of bytes occupied by the header.
-
charLength
int charLength()Returns the character length encoded in the header, if any.- Returns:
- A positive integer if a character count was encoded in the
header, or
0
(zero) if the header contained byte length information.
-
byteLength
int byteLength()Returns the byte length encoded in the header, if any.- Returns:
- A positive integer if a byte count was encoded in the
header, or
0
(zero) if the header contained character length information.
-
isCharLength
boolean isCharLength()Tells whether the encoded length was in characters or bytes.- Returns:
true
if the header contained a character count,false
if it contained a byte count.
-
toString
Returns a textual representation.
-