net.sf.farrago.type.runtime
Class EncodedCharPointer
java.lang.Object
java.io.InputStream
java.io.ByteArrayInputStream
net.sf.farrago.type.runtime.BytePointer
net.sf.farrago.type.runtime.EncodedCharPointer
- All Implemented Interfaces:
- Closeable, CharSequence, AssignableValue, DataValue
- Direct Known Subclasses:
- Ucs2CharPointer
public abstract class EncodedCharPointer
- extends BytePointer
EncodedCharPointer specializes BytePointer to interpret its bytes as
characters encoded via a given charset.
- Version:
- $Id: //open/dev/farrago/src/net/sf/farrago/type/runtime/EncodedCharPointer.java#14 $
- Author:
- John V. Sichi
Fields inherited from class net.sf.farrago.type.runtime.BytePointer |
CONCAT_METHOD_NAME, emptyBytes, ENFORCE_PRECISION_METHOD_NAME, GET_BYTE_COUNT_METHOD_NAME, INITCAP_METHOD_NAME, L1, LOWER_METHOD_NAME, OVERLAY_METHOD_NAME, ownBytes, POSITION_METHOD_NAME, S1, SET_POINTER_METHOD_NAME, SUBSTRING_METHOD_NAME, TRIM_METHOD_NAME, UPPER_METHOD_NAME |
Methods inherited from class net.sf.farrago.type.runtime.BytePointer |
allocateOwnBytes, allocateOwnBytesForPrecision, assignFrom, attemptFastAsciiByteToLong, calcSubstringPointers, cast, cast, cast, cast, cast, charAt, compareBytes, concat, copyFrom, enforceBytePrecision, finishOverlay, getByteCount, getByteCountForPrecision, initcap, isNull, length, lower, overlay, position, positionImpl, setCharAt, setNull, setPointer, subSequence, substring, trim, upper, writeToBuffer, writeToBufferAbsolute |
EncodedCharPointer
public EncodedCharPointer()
toString
public String toString()
- Specified by:
toString
in interface CharSequence
- Overrides:
toString
in class BytePointer
getCharsetName
protected abstract String getCharsetName()
- Overrides:
getCharsetName
in class BytePointer
- Returns:
- the charset used for this pointer's encoding, or BINARY if no
character data is encoded
getBytesForString
protected byte[] getBytesForString(String string)
- Description copied from class:
BytePointer
- Gets the byte representation of a string. Subclasses may override.
- Overrides:
getBytesForString
in class BytePointer
- Parameters:
string
- source
- Returns:
- byte representation
getNullableData
public Object getNullableData()
- Specified by:
getNullableData
in interface DataValue
- Overrides:
getNullableData
in class BytePointer
- Returns:
- an Object representation of this value's data, or null if this
value is null