|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.dicom4j.data.SpecificCharacterSet
public class SpecificCharacterSet
A class to encapsulate the functionality defined by the DICOM Specific Character Set
attribute, including the ability to parse the string values of the attribute and then
apply the appropriate character conversions from byte array values into Java's internal
Unicode representation contained in String.
| Constructor Summary | |
|---|---|
SpecificCharacterSet(String[] specificCharacterSetAttributeValues)
Construct a character set handler from the values of the Specific Character Set attribute. |
|
| Method Summary | |
|---|---|
String |
translateByteArrayToString(byte[] bytes)
|
String |
translateByteArrayToString(byte[] bytes,
int offset,
int length)
Translate a byte array (such as a value from a DICOM attribute), using the specified Specific Character Set, into a String. |
byte[] |
translateStringToByteArray(String string)
Encode a string into a byte array. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SpecificCharacterSet(String[] specificCharacterSetAttributeValues)
Construct a character set handler from the values of the Specific Character Set attribute.
specificCharacterSetAttributeValues - the values of Specific Character Set| Method Detail |
|---|
public String translateByteArrayToString(byte[] bytes)
public String translateByteArrayToString(byte[] bytes,
int offset,
int length)
Translate a byte array (such as a value from a DICOM attribute), using the
specified Specific Character Set, into a String.
bytes - the bytes to translateoffset - the offset into the byte array to start translationlength - how many bytes to translate
public byte[] translateStringToByteArray(String string)
throws UnsupportedEncodingException
Encode a string into a byte array.
Does not currently support ISO 2022 (or JIS 0208 or 0212 if 1.4.1 bug present).
string - the string to be encoded
UnsupportedEncodingException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||