import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
-import java.util.HashSet;
+import java.util.Collections;
import java.util.Set;
/**
public class CodePageUtil
{
- public static final Set<Charset> DOUBLE_BYTE_CHARSETS
- = new HashSet<Charset>();
-
- static {
- DOUBLE_BYTE_CHARSETS.add(StringUtil.BIG5);
- //others?
- }
+ public static final Set<Charset> DOUBLE_BYTE_CHARSETS = Collections.singleton(StringUtil.BIG5);
/** <p>Codepage 037, a special case</p> */
public static final int CP_037 = 37;
return 42; // any arbitrary constant will do
}
-
- /**
- * Returns the character position we start at.
- */
- public int getCP() {
- return getStart();
- }
-
public String toString() {
return "OldTextPiece from " + getStart() + " to " + getEnd() + " ("
+ getPieceDescriptor() + ")";