uk.me.parabola.imgfmt.app.labelenc
Class Format6Decoder

java.lang.Object
  extended by uk.me.parabola.imgfmt.app.labelenc.Format6Decoder
All Implemented Interfaces:
CharacterDecoder

public class Format6Decoder
extends java.lang.Object
implements CharacterDecoder

Convert the 6-bit label format back to a java string.


Constructor Summary
Format6Decoder()
           
 
Method Summary
 boolean addByte(int in)
          Add a byte to this decoder.
 DecodedText getText()
          Get the valid text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Format6Decoder

public Format6Decoder()
Method Detail

addByte

public boolean addByte(int in)
Description copied from interface: CharacterDecoder
Add a byte to this decoder. This will be saved until a complete label string has been detected.

Specified by:
addByte in interface CharacterDecoder
Parameters:
in - The byte read from the lbl file.
Returns:
True if a label string is finished and is ready to be retrieved via the CharacterDecoder.getText() method.

getText

public DecodedText getText()
Description copied from interface: CharacterDecoder
Get the valid text. This is guaranteed to be encoded as utf-8.

Specified by:
getText in interface CharacterDecoder
Returns:
The byte array and length as an EncodedText struct.