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) int
addCharBuffer
(char[] buffer, int start, int length) (package private) int
Add a string.(package private) int
cloneStringReference
(int stringCode) (package private) int
copyCharsToBuffer
(int stringCode, char[] buffer, int start) (package private) int
getCharArrayLength
(int stringCode) (package private) int
(package private) int
(package private) int
getSize()
(package private) String
getStringForCode
(int stringCode) private void
(package private) void
reinit
(StringHeapDeserializationHelper shdh, boolean delta) Deserialize from a binary serialized CAS(package private) void
reset()
(package private) StringHeapDeserializationHelper
Create serialization helper datastructure.(package private) StringHeapDeserializationHelper
serialize
(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
-