Class ArithmeticIntegerDecoder
- java.lang.Object
-
- org.apache.pdfbox.jbig2.decoder.arithmetic.ArithmeticIntegerDecoder
-
public class ArithmeticIntegerDecoder extends java.lang.Object
This class represents the arithmetic integer decoder, described in ISO/IEC 14492:2001 (Annex A).
-
-
Field Summary
Fields Modifier and Type Field Description private ArithmeticDecoder
decoder
private int
prev
-
Constructor Summary
Constructors Constructor Description ArithmeticIntegerDecoder(ArithmeticDecoder decoder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
decode(CX cxIAx)
Arithmetic Integer Decoding Procedure, Annex A.2.int
decodeIAID(CX cxIAID, long symCodeLen)
The IAID decoding procedure, Annex A.3.private void
setPrev(int bit)
-
-
-
Field Detail
-
decoder
private final ArithmeticDecoder decoder
-
prev
private int prev
-
-
Constructor Detail
-
ArithmeticIntegerDecoder
public ArithmeticIntegerDecoder(ArithmeticDecoder decoder)
-
-
Method Detail
-
decode
public long decode(CX cxIAx) throws java.io.IOException
Arithmetic Integer Decoding Procedure, Annex A.2.- Parameters:
cxIAx
- to be decoded value- Returns:
- Decoded value.
- Throws:
java.io.IOException
- if an underlying IO operation fails
-
setPrev
private void setPrev(int bit)
-
decodeIAID
public int decodeIAID(CX cxIAID, long symCodeLen) throws java.io.IOException
The IAID decoding procedure, Annex A.3.- Parameters:
cxIAID
- - The contexts and statistics for decoding procedure.symCodeLen
- - Symbol code length.- Returns:
- The decoded value.
- Throws:
java.io.IOException
- if an underlying IO operation fails
-
-