Class BarcodeDatamatrix
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classDeprecated.(package private) static classDeprecated.(package private) static classDeprecated. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BarcodeDimensionsDeprecated.static final intDeprecated.ASCII encodation.static final intDeprecated.The best encodation will be used.static final intDeprecated.Binary encodation.static final intDeprecated.C40 encodation.static final intDeprecated.EDIFACT encodation.static final intDeprecated.An error while parsing an extension.static final intDeprecated.The dimensions given for the symbol are illegal.static final intDeprecated.The text is too big for the symbology capabilities.static final intDeprecated.Allows extensions to be embedded at the start of the text.static final intDeprecated.No error.static final intDeprecated.No encodation needed.static final intDeprecated.Doesn't generate the image but returns all the other information.static final intDeprecated.TEXT encodation.static final intDeprecated.X21 encodation.private static final BarcodeDatamatrix.DmParams[]Deprecated.private intDeprecated.private byte[]Deprecated.private intDeprecated.private short[]Deprecated.private static final StringDeprecated. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static intasciiEncodation(byte[] text, int textOffset, int textLength, byte[] data, int dataOffset, int dataLength) Deprecated.private static intb256Encodation(byte[] text, int textOffset, int textLength, byte[] data, int dataOffset, int dataLength) Deprecated.private static intC40OrTextEncodation(byte[] text, int textOffset, int textLength, byte[] data, int dataOffset, int dataLength, boolean c40) Deprecated.createAwtImage(Color foreground, Color background) Deprecated.Creates ajava.awt.Image.Deprecated.Gets anImagewith the barcode.private voiddraw(byte[] data, int dataSize, BarcodeDatamatrix.DmParams dm) Deprecated.private static intEdifactEncodation(byte[] text, int textOffset, int textLength, byte[] data, int dataOffset, int dataLength) Deprecated.intgenerate(byte[] text, int textOffset, int textSize) Deprecated.Creates a barcode.intDeprecated.Creates a barcode.intDeprecated.Gets the whitespace border around the barcode.private static intgetEncodation(byte[] text, int textOffset, int textSize, byte[] data, int dataOffset, int dataSize, int options, boolean firstMatch) Deprecated.intDeprecated.Gets the height of the barcode.byte[]getImage()Deprecated.Gets the generated image.private static intgetNumber(byte[] text, int ptrIn, int n) Deprecated.intDeprecated.Gets the barcode options.intgetWidth()Deprecated.Gets the width of the barcode.intgetWs()Deprecated, for removal: This API element is subject to removal in a future version.private static booleanisDigit(int c) Deprecated.private static voidmakePadding(byte[] data, int position, int count) Deprecated.private intprocessExtensions(byte[] text, int textOffset, int textSize, byte[] data) Deprecated.private voidsetBit(int x, int y, int xByte) Deprecated.voidsetBorder(int border) Deprecated.Sets the whitespace border around the barcode.voidsetHeight(int height) Deprecated.Sets the height of the barcode.voidsetOptions(int options) Deprecated.Sets the options for the barcode generation.voidsetWidth(int width) Deprecated.Sets the width of the barcode.voidsetWs(int border) Deprecated, for removal: This API element is subject to removal in a future version.usesetBorder(int)private static intX12Encodation(byte[] text, int textOffset, int textLength, byte[] data, int dataOffset, int dataLength) Deprecated.
-
Field Details
-
DM_NO_ERROR
public static final int DM_NO_ERRORDeprecated.No error.- See Also:
-
DM_ERROR_TEXT_TOO_BIG
public static final int DM_ERROR_TEXT_TOO_BIGDeprecated.The text is too big for the symbology capabilities.- See Also:
-
DM_ERROR_INVALID_SQUARE
public static final int DM_ERROR_INVALID_SQUAREDeprecated.The dimensions given for the symbol are illegal.- See Also:
-
DM_ERROR_EXTENSION
public static final int DM_ERROR_EXTENSIONDeprecated.An error while parsing an extension.- See Also:
-
DM_AUTO
public static final int DM_AUTODeprecated.The best encodation will be used.- See Also:
-
DM_ASCII
public static final int DM_ASCIIDeprecated.ASCII encodation.- See Also:
-
DM_C40
public static final int DM_C40Deprecated.C40 encodation.- See Also:
-
DM_TEXT
public static final int DM_TEXTDeprecated.TEXT encodation.- See Also:
-
DM_B256
public static final int DM_B256Deprecated.Binary encodation.- See Also:
-
DM_X21
public static final int DM_X21Deprecated.X21 encodation.- See Also:
-
DM_EDIFACT
public static final int DM_EDIFACTDeprecated.EDIFACT encodation.- See Also:
-
DM_RAW
public static final int DM_RAWDeprecated.No encodation needed. The bytes provided are already encoded.- See Also:
-
DM_EXTENSION
public static final int DM_EXTENSIONDeprecated.Allows extensions to be embedded at the start of the text.- See Also:
-
DM_TEST
public static final int DM_TESTDeprecated.Doesn't generate the image but returns all the other information.- See Also:
-
dmSizes
Deprecated. -
x12
-
dimensions
Deprecated. -
extOut
private int extOutDeprecated. -
place
private short[] placeDeprecated. -
image
private byte[] imageDeprecated. -
options
private int optionsDeprecated.
-
-
Constructor Details
-
BarcodeDatamatrix
public BarcodeDatamatrix()Deprecated.
-
-
Method Details
-
makePadding
private static void makePadding(byte[] data, int position, int count) Deprecated. -
isDigit
private static boolean isDigit(int c) Deprecated. -
asciiEncodation
private static int asciiEncodation(byte[] text, int textOffset, int textLength, byte[] data, int dataOffset, int dataLength) Deprecated. -
b256Encodation
private static int b256Encodation(byte[] text, int textOffset, int textLength, byte[] data, int dataOffset, int dataLength) Deprecated. -
X12Encodation
private static int X12Encodation(byte[] text, int textOffset, int textLength, byte[] data, int dataOffset, int dataLength) Deprecated. -
EdifactEncodation
private static int EdifactEncodation(byte[] text, int textOffset, int textLength, byte[] data, int dataOffset, int dataLength) Deprecated. -
C40OrTextEncodation
private static int C40OrTextEncodation(byte[] text, int textOffset, int textLength, byte[] data, int dataOffset, int dataLength, boolean c40) Deprecated. -
getEncodation
private static int getEncodation(byte[] text, int textOffset, int textSize, byte[] data, int dataOffset, int dataSize, int options, boolean firstMatch) Deprecated. -
getNumber
private static int getNumber(byte[] text, int ptrIn, int n) Deprecated. -
setBit
private void setBit(int x, int y, int xByte) Deprecated. -
draw
Deprecated. -
processExtensions
private int processExtensions(byte[] text, int textOffset, int textSize, byte[] data) Deprecated. -
generate
Deprecated.Creates a barcode. TheStringis interpreted with the ISO-8859-1 encoding- Parameters:
text- the text- Returns:
- the status of the generation. It can be one of this values:
DM_NO_ERROR- no error.
DM_ERROR_TEXT_TOO_BIG- the text is too big for the symbology capabilities.
DM_ERROR_INVALID_SQUARE- the dimensions given for the symbol are illegal.
DM_ERROR_EXTENSION- an error was while parsing an extension. - Throws:
UnsupportedEncodingException- on error
-
generate
public int generate(byte[] text, int textOffset, int textSize) Deprecated.Creates a barcode.- Parameters:
text- the texttextOffset- the offset to the start of the texttextSize- the text size- Returns:
- the status of the generation. It can be one of this values:
DM_NO_ERROR- no error.
DM_ERROR_TEXT_TOO_BIG- the text is too big for the symbology capabilities.
DM_ERROR_INVALID_SQUARE- the dimensions given for the symbol are illegal.
DM_ERROR_EXTENSION- an error was while parsing an extension.
-
createImage
Deprecated.Gets anImagewith the barcode. A successful call to the methodgenerate()before calling this method is required.- Returns:
- the barcode
Image - Throws:
BadElementException- on error
-
createAwtImage
-
getImage
public byte[] getImage()Deprecated.Gets the generated image. The image is represented as a stream of bytes, each byte representing 8 pixels, 0 for white and 1 for black, with the high-order bit of each byte first. Each row is aligned at byte boundaries. The dimensions of the image are defined by height and width plus 2 * ws.- Returns:
- the generated image
-
getHeight
public int getHeight()Deprecated.Gets the height of the barcode. Will contain the real height used after a successful call togenerate(). This height doesn't include the whitespace border, if any.- Returns:
- the height of the barcode
-
setHeight
public void setHeight(int height) Deprecated.Sets the height of the barcode. If the height is zero it will be calculated. This height doesn't include the whitespace border, if any.The allowed dimensions are (height, width):
10, 10
12, 12
8, 18
14, 14
8, 32
16, 16
12, 26
18, 18
20, 20
12, 36
22, 22
16, 36
24, 24
26, 26
16, 48
32, 32
36, 36
40, 40
44, 44
48, 48
52, 52
64, 64
72, 72
80, 80
88, 88
96, 96
104, 104
120, 120
132, 132
144, 144- Parameters:
height- the height of the barcode
-
getWidth
public int getWidth()Deprecated.Gets the width of the barcode. Will contain the real width used after a successful call togenerate(). This width doesn't include the whitespace border, if any.- Returns:
- the width of the barcode
-
setWidth
public void setWidth(int width) Deprecated.Sets the width of the barcode. If the width is zero it will be calculated. This width doesn't include the whitespace border, if any.The allowed dimensions are (height, width):
10, 10
12, 12
8, 18
14, 14
8, 32
16, 16
12, 26
18, 18
20, 20
12, 36
22, 22
16, 36
24, 24
26, 26
16, 48
32, 32
36, 36
40, 40
44, 44
48, 48
52, 52
64, 64
72, 72
80, 80
88, 88
96, 96
104, 104
120, 120
132, 132
144, 144- Parameters:
width- the width of the barcode
-
getWs
Deprecated, for removal: This API element is subject to removal in a future version.usegetBorder() -
setWs
Deprecated, for removal: This API element is subject to removal in a future version.usesetBorder(int) -
getBorder
public int getBorder()Deprecated.Gets the whitespace border around the barcode.- Returns:
- the whitespace border around the barcode
-
setBorder
public void setBorder(int border) Deprecated.Sets the whitespace border around the barcode.- Parameters:
border- the whitespace border around the barcode
-
getOptions
public int getOptions()Deprecated.Gets the barcode options.- Returns:
- the barcode options
-
setOptions
public void setOptions(int options) Deprecated.Sets the options for the barcode generation. The options can be:One of:
DM_AUTO- the best encodation will be used
DM_ASCII- ASCII encodation
DM_C40- C40 encodation
DM_TEXT- TEXT encodation
DM_B256- binary encodation
DM_X21- X21 encodation
DM_EDIFACT- EDIFACT encodation
DM_RAW- no encodation. The bytes provided are already encoded and will be added directly to the barcode, using padding if needed. It assumes that the encodation state is left at ASCII after the last byte.
One of:
DM_EXTENSION- allows extensions to be embedded at the start of the text:exxxxxx - ECI number xxxxxx
m5 - macro 5
m6 - macro 6
f - FNC1
saabbccccc - Structured Append, aa symbol position (1-16), bb total number of symbols (2-16), ccccc file identification (0-64515)
p - Reader programming
. - extension terminatorExample for a structured append, symbol 2 of 6, with FNC1 and ECI 000005. The actual text is "Hello".
s020600075fe000005.Hello
One of:
DM_TEST- doesn't generate the image but returns all the other information.- Parameters:
options- the barcode options
-
getBorder()