Package org.apache.uima.cas.impl
Class StringHeap
java.lang.Object
org.apache.uima.cas.impl.StringHeap
Encapsulate string storage for the CAS.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) intaddCharBuffer(char[] buffer, int start, int length) (package private) intAdd a string.(package private) intcloneStringReference(int stringCode) (package private) intcopyCharsToBuffer(int stringCode, char[] buffer, int start) (package private) intgetCharArrayLength(int stringCode) (package private) int(package private) int(package private) intgetSize()(package private) StringgetStringForCode(int stringCode) private void(package private) voidreinit(StringHeapDeserializationHelper shdh, boolean delta) Deserialize from a binary serialized CAS(package private) voidreset()(package private) StringHeapDeserializationHelperCreate serialization helper datastructure.(package private) StringHeapDeserializationHelperserialize(int startPos) String[]toArray()
-
Field Details
-
leastStringCode
private static final int leastStringCode- See Also:
-
stringList
-
-
Constructor Details
-
StringHeap
StringHeap()
-
-
Method Details
-
initMemory
private void initMemory() -
reinit
Deserialize from a binary serialized CAS- Parameters:
shdh- Serialization helper datastructure.
-
serialize
StringHeapDeserializationHelper serialize()Create serialization helper datastructure.- Returns:
- Serialization helper that can be interpreted easier by serialization code.
-
serialize
-
reset
void reset() -
getStringForCode
-
copyCharsToBuffer
int copyCharsToBuffer(int stringCode, char[] buffer, int start) -
addString
Add a string.- Parameters:
s- The string.- Returns:
- The positional code of the added string.
-
cloneStringReference
int cloneStringReference(int stringCode) -
addCharBuffer
int addCharBuffer(char[] buffer, int start, int length) -
getCharArrayLength
int getCharArrayLength(int stringCode) -
getLeastStringCode
int getLeastStringCode() -
getLargestStringCode
int getLargestStringCode() -
getSize
int getSize() -
toArray
-