|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.datacrow.util.cuecat.CueCatDecoder
public class CueCatDecoder
This class handles decoding a line of CueCat output and creating
a CueCatCode object to store that data. CueCat output consists of
3 period separated pieces of information, simialr to this:
.C3nZC3nZC3nYDhv7D3DWCxnX.cGf2.ENr7C3b3DNbWChPXDxzZDNP6.
The first item is the CueCat device ID. The second is the barcode type.
The third is the actual bar code that was scanned.
This class can be used to parse each item separately or all at once, returning
Strings or a CueCatCode.
The following is the process that is used to undo the encoding performed by the CueCat:
Constructor Summary | |
---|---|
CueCatDecoder()
|
Method Summary | |
---|---|
static CueCatCode |
decodeLine(java.lang.String s)
Decode a while line of CueCat outout and create a CueCatCode object. |
static java.lang.String |
decodeToken(java.lang.String encoded)
Decodes one item fromthe CueCat output |
static char[] |
padInput(java.lang.String encoded)
Adds '=' symbols to the end of any input until its length is evenly divisible by 4 |
static void |
swapUpperLower(char[] chars)
Swap upper case to lower case and vice versa, minuses to slashes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CueCatDecoder()
Method Detail |
---|
public static java.lang.String decodeToken(java.lang.String encoded)
encoded
- the CueCat encoded item, with no periods
public static void swapUpperLower(char[] chars)
chars
- the character array to convertpublic static CueCatCode decodeLine(java.lang.String s)
s
- the line if input from the CueCat
public static char[] padInput(java.lang.String encoded)
encoded
- the String to be padded out
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |