public final class EasyScriptCompressedDecoder extends java.lang.Object implements EasyScriptDecoder
Modifier and Type | Field and Description |
---|---|
protected java.util.List<EasyScriptEventListener> |
coordinateReceiverListeners
Default constructor, uses the STN protocol.
|
Constructor and Description |
---|
EasyScriptCompressedDecoder(SignatureProtocol signatureProtocol,
int position,
java.util.List<EasyScriptEventListener> listOfCoordinateReceiverListener)
Constructor, creates a new instance of EasyScriptEncoder class.
|
Modifier and Type | Method and Description |
---|---|
protected int |
convertBodnarCharsToValue(java.lang.StringBuilder signature)
This method reads characters from signature and puts them in 9-bit binary value
It requires 2 or 3 characters and should only be given as many.
|
SignatureProtocol |
getSignatureProtocol()
Gets the current signature protocol.
|
void |
parseSignature(char ch)
This method parses the signature character by character to decode it.
|
protected int |
searchBinaryTree(java.util.List<java.lang.Boolean> stream)
This method parses the binary tree to find the value corresponding to a binary string
|
protected java.util.List<EasyScriptEventListener> coordinateReceiverListeners
public EasyScriptCompressedDecoder(SignatureProtocol signatureProtocol, int position, java.util.List<EasyScriptEventListener> listOfCoordinateReceiverListener)
signatureProtocol
- Is the current used signature protocolposition
- the position of the first character of signature data in the entire stream. Follows the meta data.listOfCoordinateReceiverListener
- Interested listeners.protected int searchBinaryTree(java.util.List<java.lang.Boolean> stream)
stream
- a list of boolean values represents the binary stream.protected int convertBodnarCharsToValue(java.lang.StringBuilder signature) throws SignatureInvalidException
signature
- String Represents the compressed signatureSignatureInvalidException
- Thrown in the event of a problem.public SignatureProtocol getSignatureProtocol()
public void parseSignature(char ch) throws SignatureInvalidException
parseSignature
in interface EasyScriptDecoder
ch
- A char read from the signature.SignatureInvalidException
- Thrown in the event of a problem.