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
Element
s from a tree of StoredTree.Node
s.
This is the converse of StoredTree.Deflater
.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final Locale
Locale to use for producing error message.private int
Index of the next offset to return in theoffsets
array.private final int
IfElement.offset
must be fixed to a value, the bitwise NOT value of that offset.private final short[]
TheStoredTree.offsets
array. -
Constructor Summary
ConstructorsConstructorDescriptionInflater
(AbstractParser parser, short[] offsets, int isFragment) Creates a new inflater. -
Method Summary
Modifier and TypeMethodDescription(package private) final int
Returns the value to assign toElement.offset
for the next element.
-
Field Details
-
isFragment
private final int isFragmentIfElement.offset
must be fixed to a value, the bitwise NOT value of that offset. Otherwise 0. This field packs two information:Element.isFragment
= (isFragment
!= 0)- If
isFragment
istrue
, then:Element.offset
=~isFragment
-
offsets
private final short[] offsetsTheStoredTree.offsets
array. Shall not be modified because potentially shared. Ignored ifisFragment
!= 0. -
index
private int indexIndex of the next offset to return in theoffsets
array. 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.offsets
array. Will not be modified.isFragment
- non-zero if and only ifElement.isFragment
istrue
. In such case, this value must be~Element.offset
.
-
-
Method Details
-
nextOffset
final int nextOffset()Returns the value to assign toElement.offset
for the next element.
-