public class StreamedFileCStoreItemRequest extends AbstractCStoreItemRequest implements DeferredCStoreItemRequest
A DeferredCStoreItemRequest that is initialized from an InputStream of a DICOM Part 10 file.
This class is used by CStoreSCUFactory.createMultiCStoreSCU(String, int, String, String, Iterator, ImmutablePair[])
and should not be instantiated directly. The class reads the preamble and file meta information of the
DICOM Part10 file lazily when the sop class, transfer syntax or sop instance of the file are retrieved.
The specified inputstream is positioned at the beginning of the group following the file meta information
CStoreItemRequest.Status
name, sopClass, sopInstanceUID, status, throwable, transferSyntax
EXCEPTION, NODICOM, VALID
Constructor and Description |
---|
StreamedFileCStoreItemRequest(java.io.InputStream inputStream)
Callers should not instantiate this class directly but use
CStoreSCUFactory.createMultiCStoreSCU(String, int, String, String, Iterator, ImmutablePair[]) . |
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
getInputStream()
returns an InputStream of the DICOM dataset to be stored.
|
long |
getSize()
an indication of the size (bytes) of the instance to be sent
|
java.lang.String |
getSopClass()
the SOP Class of the SOP instance to be stored
|
java.lang.String |
getSopInstanceUID()
the SOP Instance UID of the SOP instance to be stored
|
CStoreItemRequest.Status |
getStatus()
the status of this request.
|
java.lang.String |
getTransferSyntax()
the Transfer Syntax of the SOP instance to be stored
|
DicomObject |
readDicomObject()
returns the DicomObject that will be sent in the C-STORE
|
void |
setSize(long size)
will be called as soon as the length of the item is known
|
equals, getName, getThrowable, hashCode, setStatus, setThrowable
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getName, getThrowable, setStatus, setThrowable
public StreamedFileCStoreItemRequest(java.io.InputStream inputStream)
CStoreSCUFactory.createMultiCStoreSCU(String, int, String, String, Iterator, ImmutablePair[])
.inputStream
- inputstream of a DICOM Part10 filepublic DicomObject readDicomObject() throws DicomException, java.io.IOException
CStoreItemRequest
readDicomObject
in interface CStoreItemRequest
readDicomObject
in class AbstractCStoreItemRequest
DicomException
java.io.IOException
public java.io.InputStream getInputStream()
DeferredCStoreItemRequest
getInputStream
in interface DeferredCStoreItemRequest
public CStoreItemRequest.Status getStatus()
CStoreItemRequest
getStatus
in interface CStoreItemRequest
getStatus
in class AbstractCStoreItemRequest
public java.lang.String getSopClass()
CStoreItemRequest
getSopClass
in interface CStoreItemRequest
getSopClass
in class AbstractCStoreItemRequest
public java.lang.String getSopInstanceUID()
CStoreItemRequest
getSopInstanceUID
in interface CStoreItemRequest
getSopInstanceUID
in class AbstractCStoreItemRequest
public java.lang.String getTransferSyntax()
CStoreItemRequest
getTransferSyntax
in interface CStoreItemRequest
getTransferSyntax
in class AbstractCStoreItemRequest
public long getSize()
CStoreItemRequest
getSize
in interface CStoreItemRequest
getSize
in class AbstractCStoreItemRequest
public void setSize(long size)
DeferredCStoreItemRequest
setSize
in interface DeferredCStoreItemRequest