Trispark JDT
2.50.13

com.archimed.dicom
Class DumpUtils

java.lang.Object
  extended by com.archimed.dicom.DumpUtils

public class DumpUtils
extends java.lang.Object

With DumpUtils the contents of a DicomObject can be written to an outputstream in a human readable tabular format. Non-significant whitespace is preserved in the dumped content.


Constructor Summary
DumpUtils(boolean metainfo, boolean grouplengths)
          constructs a DumpUtils object with maxdescription 35, maxvalue 60 and indent size 6.
DumpUtils(int maxdescription, int maxvalue, int indentsize, boolean metainfo)
           
DumpUtils(int maxdescription, int maxvalue, int indentsize, boolean metainfo, boolean grouplengths)
           
 
Method Summary
 void dump(DicomObject dcm, java.io.OutputStream out)
          write the contents of a DicomObject to an outputstream in a tabular format.
 void dump(DicomObject dcm, java.lang.StringBuffer stringBuffer)
           
static java.lang.String tagDescriptionString(int g, int e)
           
static java.lang.String tagString(int g, int e)
           
static java.lang.String toHexString(byte b)
          returns a 2 digit hex String representation of the specified byte
static java.lang.String toHexString(int i, int n)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DumpUtils

public DumpUtils(boolean metainfo,
                 boolean grouplengths)
constructs a DumpUtils object with maxdescription 35, maxvalue 60 and indent size 6.

Parameters:
metainfo - boolean
grouplengths - boolean

DumpUtils

public DumpUtils(int maxdescription,
                 int maxvalue,
                 int indentsize,
                 boolean metainfo,
                 boolean grouplengths)
Parameters:
maxdescription - the maximum number of characters for the tag description column
maxvalue - the maximum number of characters for the the tag value column
indentsize - the number of characters to indent when a sequence is encountered
metainfo - also dump the file metainformation or not
grouplengths - dump group lengths

DumpUtils

public DumpUtils(int maxdescription,
                 int maxvalue,
                 int indentsize,
                 boolean metainfo)
Parameters:
maxdescription - the maximum number of characters for the tag description column
maxvalue - the maximum number of characters for the the tag value column
indentsize - the number of characters to indent when a sequence is encountered
metainfo - also dump the file metainformation or not
Method Detail

toHexString

public static java.lang.String toHexString(byte b)
returns a 2 digit hex String representation of the specified byte

Parameters:
b -
Returns:

toHexString

public static java.lang.String toHexString(int i,
                                           int n)

tagString

public static java.lang.String tagString(int g,
                                         int e)

tagDescriptionString

public static java.lang.String tagDescriptionString(int g,
                                                    int e)

dump

public void dump(DicomObject dcm,
                 java.lang.StringBuffer stringBuffer)
          throws java.io.IOException
Throws:
java.io.IOException

dump

public void dump(DicomObject dcm,
                 java.io.OutputStream out)
          throws java.io.IOException
write the contents of a DicomObject to an outputstream in a tabular format. Data elements in the DicomObject that contain Strings are converted into bytes according to the platform's default character encoding.

Parameters:
dcm -
out -
Throws:
java.io.IOException

Trispark JDT
2.50.13

Copyright © 1999-2008 Trispark. All Rights Reserved.