|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.InputStream
java.io.ByteArrayInputStream
net.sf.farrago.type.runtime.BytePointer
net.sf.farrago.type.runtime.EncodedCharPointer
net.sf.farrago.type.runtime.Ucs2CharPointer
public class Ucs2CharPointer
Ucs2CharPointer specializes EncodedCharPointer to interpret its bytes as characters encoded via a UCS-2 charset.
| Field Summary |
|---|
| 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 |
| Fields inherited from class java.io.ByteArrayInputStream |
|---|
buf, count, mark, pos |
| Fields inherited from interface net.sf.farrago.type.runtime.AssignableValue |
|---|
ASSIGNMENT_METHOD_NAME |
| Constructor Summary | |
|---|---|
Ucs2CharPointer()
|
|
| Method Summary | |
|---|---|
protected void |
allocateOwnBytesForPrecision(int n)
|
long |
attemptFastAsciiByteToLong()
Attempts to convert this pointer's contents from a single-byte-ASCII-encoded integer string into a long. |
char |
charAt(int index)
|
void |
enforceBytePrecision(int precision,
boolean needPad,
byte padByte)
Pads or truncates this value according to the given precision. |
protected int |
getByteCountForPrecision(int n)
|
protected String |
getCharsetName()
|
void |
initcap(BytePointer bp1)
initcap the string. |
int |
length()
|
void |
lower(BytePointer bp1)
lower the case for each character of the string |
void |
overlay(BytePointer bp1,
BytePointer bp2,
int starting,
int length,
boolean useLength)
Assigns this value to the result of inserting bp2's value into bp1's value at a specified starting point, possibly deleting a prefix of the remainder of bp1 of a given length. |
int |
position(BytePointer bp1)
|
protected void |
setCharAt(int index,
char c)
|
CharSequence |
subSequence(int start,
int end)
|
void |
substring(int starting,
int length,
boolean useLength)
Reduces the value to a substring of the current value. |
void |
trim(int trimOrdinal,
BytePointer bp1,
BytePointer bp2)
|
void |
upper(BytePointer bp1)
upper the case for each character of the string |
| Methods inherited from class net.sf.farrago.type.runtime.EncodedCharPointer |
|---|
getBytesForString, getNullableData, toString |
| Methods inherited from class net.sf.farrago.type.runtime.BytePointer |
|---|
allocateOwnBytes, assignFrom, calcSubstringPointers, cast, cast, cast, cast, cast, compareBytes, concat, copyFrom, finishOverlay, getByteCount, isNull, positionImpl, setNull, setPointer, writeToBuffer, writeToBufferAbsolute |
| Methods inherited from class java.io.ByteArrayInputStream |
|---|
available, close, mark, markSupported, read, read, reset, skip |
| Methods inherited from class java.io.InputStream |
|---|
read |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Ucs2CharPointer()
| Method Detail |
|---|
public int length()
length in interface CharSequencelength in class BytePointerprotected void allocateOwnBytesForPrecision(int n)
allocateOwnBytesForPrecision in class BytePointerprotected int getByteCountForPrecision(int n)
getByteCountForPrecision in class BytePointer
public void enforceBytePrecision(int precision,
boolean needPad,
byte padByte)
BytePointer
enforceBytePrecision in class BytePointerprecision - desired precision, in characters for character data, or
bytes for binary dataneedPad - true if short values should be paddedpadByte - byte to pad with
public void substring(int starting,
int length,
boolean useLength)
BytePointer
substring in class BytePointerstarting - desired starting positionlength - the length.useLength - to indicate whether length parameter should be used.
public void overlay(BytePointer bp1,
BytePointer bp2,
int starting,
int length,
boolean useLength)
BytePointer
overlay in class BytePointerbp1 - string1bp2 - string2starting - starting pointlength - lengthuseLength - whether to use length parameterpublic int position(BytePointer bp1)
position in class BytePointerpublic char charAt(int index)
charAt in interface CharSequencecharAt in class BytePointer
protected void setCharAt(int index,
char c)
setCharAt in class BytePointer
public CharSequence subSequence(int start,
int end)
subSequence in interface CharSequencesubSequence in class BytePointerprotected String getCharsetName()
getCharsetName in class EncodedCharPointer
public void trim(int trimOrdinal,
BytePointer bp1,
BytePointer bp2)
trim in class BytePointerpublic void upper(BytePointer bp1)
BytePointer
upper in class BytePointerbp1 - string1public void lower(BytePointer bp1)
BytePointer
lower in class BytePointerbp1 - string1public void initcap(BytePointer bp1)
BytePointer
initcap in class BytePointerbp1 - string1public long attemptFastAsciiByteToLong()
BytePointer
attemptFastAsciiByteToLong in class BytePointer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||