public class SpecificCharacterSet extends Object
| Modifier and Type | Field and Description |
|---|---|
static SpecificCharacterSet |
ASCII |
protected org.aoju.bus.image.galaxy.data.SpecificCharacterSet.Codec[] |
codecs |
protected String[] |
dicomCodes |
| Modifier | Constructor and Description |
|---|---|
protected |
SpecificCharacterSet(org.aoju.bus.image.galaxy.data.SpecificCharacterSet.Codec[] codecs,
String... codes) |
| Modifier and Type | Method and Description |
|---|---|
static String |
checkCharsetName(String charsetName) |
static String |
checkSpecificCharacterSet(String code) |
boolean |
contains(SpecificCharacterSet other) |
boolean |
containsASCII() |
String |
decode(byte[] val) |
byte[] |
encode(String val,
String delimiters) |
boolean |
equals(Object other) |
static SpecificCharacterSet |
getDefaultCharacterSet() |
int |
hashCode() |
boolean |
isASCII() |
boolean |
isUTF8() |
static void |
resetCharsetNameMappings()
Reset mapping of DICOM Specific Character Set (0008,0005) values to named charsets as specified by
DICOM PS 3.3 Table C.12-2.
|
static void |
setCharsetNameMapping(String code,
String charsetName)
Overwrites mapping of value of DICOM Specific Character Set (0008,0005) to named charset.
|
static void |
setDefaultCharacterSet(String code) |
String[] |
toCodes() |
String |
toText(String s) |
static boolean |
trimISO2022(String[] codes)
Replace single code for Single-Byte Character Sets with Code Extensions by code for Single-Byte Character Sets
without Code Extensions.
|
static SpecificCharacterSet |
valueOf(String... codes) |
public static final SpecificCharacterSet ASCII
protected final org.aoju.bus.image.galaxy.data.SpecificCharacterSet.Codec[] codecs
protected final String[] dicomCodes
protected SpecificCharacterSet(org.aoju.bus.image.galaxy.data.SpecificCharacterSet.Codec[] codecs,
String... codes)
public static SpecificCharacterSet getDefaultCharacterSet()
public static void setDefaultCharacterSet(String code)
public static void setCharsetNameMapping(String code, String charsetName)
For example, SpecificCharacterSet.setCharsetNameMapping("ISO_IR 100", "ISO-8859-15") associates
ISO-8859-15 (Latin-9), SpecificCharacterSet.setCharsetNameMapping("ISO_IR 100", "windows-1252")
Windows-1252 (CP-1252), with DICOM Specific Character Set (0008,0005) code value ISO_IR 100 -
replacing the default mapping to ISO-8859-1 (Latin-1) - were both (ISO-8859-15 and Windows-1252)
containing characters Š/š and Ž/ž not included in Latin-1, but used in Estonian and Finnish for
transcribing foreign names.
code - value of DICOM Specific Character Set (0008,0005)charsetName - The name of the mapped charsetIllegalCharsetNameException - If the given code or charset name is illegalIllegalArgumentException - If the given charsetName is nullUnsupportedCharsetException - If no support for the named charset is available
in this instance of the Java virtual machinepublic static void resetCharsetNameMappings()
public static SpecificCharacterSet valueOf(String... codes)
public static boolean trimISO2022(String[] codes)
codes - the codestrue if the code was replaced.public String[] toCodes()
public String decode(byte[] val)
public boolean isUTF8()
public boolean isASCII()
public boolean containsASCII()
public boolean contains(SpecificCharacterSet other)
Copyright © 2020. All rights reserved.