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) final int
getCharArrayLength
(int stringCode) (package private) final int
(package private) final int
(package private) final int
getSize()
(package private) String
getStringForCode
(int stringCode) private final void
(package private) final void
reinit
(StringHeapDeserializationHelper shdh, boolean delta) Deserialize from a binary serialized CAS(package private) final void
reset()
(package private) StringHeapDeserializationHelper
Create serialization helper datastructure.(package private) StringHeapDeserializationHelper
serialize
(int startPos)
-
Field Details
-
leastStringCode
private static final int leastStringCode- See Also:
-
stringList
-
-
Constructor Details
-
StringHeap
StringHeap()
-
-
Method Details
-
initMemory
private final 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
final 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
final int getCharArrayLength(int stringCode) -
getLeastStringCode
final int getLeastStringCode() -
getLargestStringCode
final int getLargestStringCode() -
getSize
final int getSize()
-