Package org.aoju.bus.image.galaxy.data
Class SpecificCharacterSet
java.lang.Object
org.aoju.bus.image.galaxy.data.SpecificCharacterSet
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SpecificCharacterSetprotected final org.aoju.bus.image.galaxy.data.SpecificCharacterSet.Codec[]protected final String[] -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSpecificCharacterSet(org.aoju.bus.image.galaxy.data.SpecificCharacterSet.Codec[] codecs, String... codes) -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcheckCharsetName(String charsetName) static Stringbooleancontains(SpecificCharacterSet other) booleandecode(byte[] val) byte[]booleanstatic SpecificCharacterSetinthashCode()booleanisASCII()booleanisUTF8()static voidReset mapping of DICOM Specific Character Set (0008,0005) values to named charsets as specified by DICOM PS 3.3 Table C.12-2.static voidsetCharsetNameMapping(String code, String charsetName) Overwrites mapping of value of DICOM Specific Character Set (0008,0005) to named charset.static voidsetDefaultCharacterSet(String code) String[]toCodes()static booleantrimISO2022(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
-
Field Details
-
ASCII
-
codecs
protected final org.aoju.bus.image.galaxy.data.SpecificCharacterSet.Codec[] codecs -
dicomCodes
-
-
Constructor Details
-
SpecificCharacterSet
protected SpecificCharacterSet(org.aoju.bus.image.galaxy.data.SpecificCharacterSet.Codec[] codecs, String... codes)
-
-
Method Details
-
getDefaultCharacterSet
-
setDefaultCharacterSet
-
setCharsetNameMapping
Overwrites mapping of value of DICOM Specific Character Set (0008,0005) to named charset.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 valueISO_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.- Parameters:
code- value of DICOM Specific Character Set (0008,0005)charsetName- The name of the mapped charset- Throws:
IllegalCharsetNameException- If the given code or charset name is illegalIllegalArgumentException- If the givencharsetNameis nullUnsupportedCharsetException- If no support for the named charset is available in this instance of the Java virtual machine
-
resetCharsetNameMappings
public 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. -
checkSpecificCharacterSet
-
checkCharsetName
-
valueOf
-
trimISO2022
Replace single code for Single-Byte Character Sets with Code Extensions by code for Single-Byte Character Sets without Code Extensions.- Parameters:
codes- the codes- Returns:
trueif the code was replaced.
-
toCodes
-
encode
-
decode
-
isUTF8
public boolean isUTF8() -
isASCII
public boolean isASCII() -
containsASCII
public boolean containsASCII() -
contains
-
toText
-
equals
-
hashCode
public int hashCode()
-