Package org.apache.sis.io.wkt
Class StoredTree.Inflater
java.lang.Object
org.apache.sis.io.wkt.StoredTree.Inflater
- Enclosing class:
- StoredTree
A helper class for decompressing a tree of
Elements from a tree of StoredTree.Nodes.
This is the converse of StoredTree.Deflater.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final LocaleLocale to use for producing error message.private intIndex of the next offset to return in theoffsetsarray.private final intIfElement.offsetmust be fixed to a value, the bitwise NOT value of that offset.private final short[]TheStoredTree.offsetsarray. -
Constructor Summary
ConstructorsConstructorDescriptionInflater(AbstractParser parser, short[] offsets, int isFragment) Creates a new inflater. -
Method Summary
Modifier and TypeMethodDescription(package private) final intReturns the value to assign toElement.offsetfor the next element.
-
Field Details
-
isFragment
private final int isFragmentIfElement.offsetmust be fixed to a value, the bitwise NOT value of that offset. Otherwise 0. This field packs two information:Element.isFragment= (isFragment!= 0)- If
isFragmentistrue, then:Element.offset=~isFragment
-
offsets
private final short[] offsetsTheStoredTree.offsetsarray. Shall not be modified because potentially shared. Ignored ifisFragment!= 0. -
index
private int indexIndex of the next offset to return in theoffsetsarray. Ignored ifisFragment!= 0. -
errorLocale
Locale to use for producing error message.
-
-
Constructor Details
-
Inflater
Inflater(AbstractParser parser, short[] offsets, int isFragment) Creates a new inflater.- Parameters:
parser- the parser which will be used for parsing the tree.offsets- theStoredTree.offsetsarray. Will not be modified.isFragment- non-zero if and only ifElement.isFragmentistrue. In such case, this value must be~Element.offset.
-
-
Method Details
-
nextOffset
final int nextOffset()Returns the value to assign toElement.offsetfor the next element.
-