public class Dimse extends java.lang.Object implements ULServiceMessage
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.
AssociationIO
ABORT, ASS_ACKNOWLEDGE, ASS_REJECT, ASS_REQUEST, DIMSE, REL_REQUEST, REL_RESPONSE
Constructor and Description |
---|
Dimse(int pcId,
Command command,
DicomObject dataset)
Use this constructor to create a new Dimse instance for writing to an
association.
|
Modifier and Type | Method and Description |
---|---|
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.
|
java.io.OutputStream |
getDataSetOutputStream()
returns the internal OutputStream to which this Dimse message should be written
if the writing is deferred.
|
int |
getMessageType()
returns the type of ULServiceMessage
|
java.lang.String |
getMessageTypeName()
returns a name for the message type
|
int |
getPresentationContextId()
returns the presentation context ID of this DIMSE
|
boolean |
isDeferredWriting()
default false.
|
void |
setDeferredWriting(boolean deferredWriting) |
public Dimse(int pcId, Command command, DicomObject dataset)
pcId
- the presentation context ID to be usedcommand
- the command of the DIMSEdataset
- the optional dataset of the DIMSEpublic int getMessageType()
getMessageType
in interface ULServiceMessage
public java.lang.String getMessageTypeName()
ULServiceMessage
getMessageTypeName
in interface ULServiceMessage
public int getPresentationContextId()
public Command getCommand()
public DicomObject getDataSet() throws java.io.IOException, DicomException
java.io.IOException
DicomException
public java.io.InputStream getDataSetInputStream()
public java.io.OutputStream getDataSetOutputStream()
public boolean isDeferredWriting()
public void setDeferredWriting(boolean deferredWriting)