|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.dicom4j.data.elements.support.DataElement
org.dicom4j.data.elements.support.StringElement
public abstract class StringElement
Abstract class specializing DataElement for the family of string attributes.
| Method Summary | |
|---|---|
void |
addValue(String aValue)
Add a(nother) String value after any existing
values of this attribute. |
void |
clear()
Clear Data contains in this Element |
long |
getPaddedVL()
Get the value length of this attribute, accounting for the need for even-length padding. |
String[] |
getStringValues(NumberFormat format)
Get the values of this attribute as strings. |
long |
getValueLength()
Gets the value length |
int |
getValueMultiplicity()
Get the value multiplicity of this element |
void |
read(DicomInputStream aStream,
long length,
SpecificCharacterSet aCharacterSet)
Read a constructed attribute from an input stream; called only by concrete sub-classes. |
void |
setValue(String aValue)
|
String |
toString()
Dump the contents of the attribute as a human-readable string. |
void |
write(DicomOutputStream aOutputStream)
Write the entire attribute (including values) to the output stream. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public void clear()
DataElement
clear in class DataElementpublic long getPaddedVL()
DataElementGet the value length of this attribute, accounting for the need for even-length padding.
getPaddedVL in class DataElement
public String[] getStringValues(NumberFormat format)
throws DicomException
Get the values of this attribute as strings.
The strings are first cleaned up into a canonical form, to remove leading and trailing padding.
getStringValues in class DataElementformat - the format to use for each numerical or decimal value
String
DicomException - not thrownpublic long getValueLength()
DataElementGets the value length
getValueLength in class DataElementpublic int getValueMultiplicity()
DataElementGet the value multiplicity of this element
getValueMultiplicity in class DataElement
public void read(DicomInputStream aStream,
long length,
SpecificCharacterSet aCharacterSet)
throws IOException,
DicomException
Read a constructed attribute from an input stream; called only by concrete sub-classes.
read in class DataElementlength - the value length of the attributei - the input streamaCharacterSet - the character set to be used for the text
IOException
DicomException
public void write(DicomOutputStream aOutputStream)
throws DicomException,
IOException
DataElementWrite the entire attribute (including values) to the output stream.
write in class DataElementaOutputStream -
IOException
DicomExceptionpublic void setValue(String aValue)
public void addValue(String aValue)
DataElementString value after any existing
values of this attribute.
addValue in class DataElementaValue -
DicomExceptionpublic String toString()
DataElementDump the contents of the attribute as a human-readable string.
No new line is appended.
The result is of the form:
(0xgggg,0xeeee) VR=<XX> VL=<0xnnnn> <...>
For example:
(0x0018,0x0020) VR=<CS> VL=<0x2> <GR>
toString in class DataElementString value
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||