Trispark JDT
2.50.13

com.archimed.dicom.network
Class Dimse

java.lang.Object
  extended by com.archimed.dicom.network.Dimse
All Implemented Interfaces:
ULServiceMessage

public class Dimse
extends java.lang.Object
implements ULServiceMessage

represents a DIMSE message. Dimse messages can be written to the outputstream of an assocation or can be read from the inputstream of an assocation with the AssocationIO class.

To create new Dimse messages for writing to an assocation, use the public constructor Dimse(int pcId,Command command,DicomObject dataset).

Dimse messages that are read from an assocation with the read method of the AssocationIO class and that have a dataset present, will return an inputstream to this dataset as it is received from the network. This inputstream can be used to read the dataset into a DicomObject. Alternatively the getDataSet method can be used. The first call to getDataSet method will result in the reading and returning of the dataset into a newly created DicomObject. Subsequent calls will return a reference to this previously created DicomObject.

Since:
1.50
See Also:
AssociationIO

Field Summary
 
Fields inherited from interface com.archimed.dicom.network.ULServiceMessage
ABORT, ASS_ACKNOWLEDGE, ASS_REJECT, ASS_REQUEST, DIMSE, REL_REQUEST, REL_RESPONSE
 
Constructor Summary
Dimse(int pcId, Command command, DicomObject dataset)
          Use this constructor to create a new Dimse instance for writing to an association.
 
Method Summary
 Command getCommand()
          returns the command of this DIMSE
 DicomObject getDataSet()
          returns the dataset of this DIMSE or null if no dataset is present.
 java.io.InputStream getDataSetInputStream()
          returns an inputstream to the dataset as it is received from the (socket) inputstream or null if no dataset is present.
 int getMessageType()
          returns the type of ULServiceMessage
 int getPresentationContextId()
          returns the presentation context ID of this DIMSE
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dimse

public Dimse(int pcId,
             Command command,
             DicomObject dataset)
Use this constructor to create a new Dimse instance for writing to an association. Specify null for the dataset argument if this Dimse does not contain a dataset.

Parameters:
pcId - the presentation context ID to be used
command - the command of the DIMSE
dataset - the optional dataset of the DIMSE
Method Detail

getMessageType

public int getMessageType()
returns the type of ULServiceMessage

Specified by:
getMessageType in interface ULServiceMessage
Returns:
ULServiceMessage.DIMSE

getPresentationContextId

public int getPresentationContextId()
returns the presentation context ID of this DIMSE

Returns:

getCommand

public Command getCommand()
returns the command of this DIMSE

Returns:

getDataSet

public DicomObject getDataSet()
                       throws java.io.IOException,
                              DicomException
returns the dataset of this DIMSE or null if no dataset is present. If this Dimse object is obtained as the result of a read call on AssocationIO and if a dataset is present in the Dimse, then calling this method a first time will result in the creation of a new DicomObject in which the entire dataset is read. Subsequent calls to this method will return the dataset.

Returns:
Throws:
java.io.IOException
DicomException

getDataSetInputStream

public java.io.InputStream getDataSetInputStream()
returns an inputstream to the dataset as it is received from the (socket) inputstream or null if no dataset is present. This inputstream can be used by a a read call of DicomObject to parse the dataset into a DicomObject.

Returns:

Trispark JDT
2.50.13

Copyright © 1999-2008 Trispark. All Rights Reserved.