public final class ECIEncoderSet
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.nio.charset.CharsetEncoder[] |
encoders |
private static java.util.List<java.nio.charset.CharsetEncoder> |
ENCODERS |
private int |
priorityEncoderIndex |
Constructor and Description |
---|
ECIEncoderSet(java.lang.String stringToEncode,
java.nio.charset.Charset priorityCharset,
int fnc1)
Constructs an encoder set
|
Modifier and Type | Method and Description |
---|---|
boolean |
canEncode(char c,
int encoderIndex) |
byte[] |
encode(char c,
int encoderIndex) |
byte[] |
encode(java.lang.String s,
int encoderIndex) |
java.nio.charset.Charset |
getCharset(int index) |
java.lang.String |
getCharsetName(int index) |
int |
getECIValue(int encoderIndex) |
int |
getPriorityEncoderIndex() |
int |
length() |
private static final java.util.List<java.nio.charset.CharsetEncoder> ENCODERS
private final java.nio.charset.CharsetEncoder[] encoders
private final int priorityEncoderIndex
public ECIEncoderSet(java.lang.String stringToEncode, java.nio.charset.Charset priorityCharset, int fnc1)
stringToEncode
- the string that needs to be encodedpriorityCharset
- The preferred Charset
or null.fnc1
- fnc1 denotes the character in the input that represents the FNC1 character or -1 for a non-GS1 bar
code. When specified, it is considered an error to pass it as argument to the methods canEncode() or encode().public int length()
public java.lang.String getCharsetName(int index)
public java.nio.charset.Charset getCharset(int index)
public int getECIValue(int encoderIndex)
public int getPriorityEncoderIndex()
public boolean canEncode(char c, int encoderIndex)
public byte[] encode(char c, int encoderIndex)
public byte[] encode(java.lang.String s, int encoderIndex)