public interface BulkDataReference extends DataElementValue
The underlying data of a bulk data reference is accessed by reading length bytes after an offset via an
inputstream returned by getInputStream()
.
A bulk data reference can be in an unresolved or resolved state, giving implementors the opportunity to lazy initialize the proper values for the length, offset and inputstream.
JDT will invoke resolve()
before acquiring a reference to the inputstream of the bulk data reference by
invoking getInputStream()
and will afterwards invoke release()
to give implementors the opportunity
to release any associated resources with the bulk data reference.
For uncompressed pixeldata, a bulk data reference can be used to represent a single frame or multiple frames. JDT will concatenate the specified input streams of consecutive BulkDataReferences in a pixeldata element.
For compressed pixeldata, a bulk data reference represents a single fragment - a frame may have multiple fragments - in an encapsulated transfer syntax.
BulkDataReferences are currently supported for value representations OB,OW,OL,OF,OD,FL,FD,US,SS,UL,SL,UN .
Modifier and Type | Method and Description |
---|---|
java.nio.ByteOrder |
getByteOrder()
return the byte order of the data read from the inputstream.
|
java.lang.String |
getDescription()
returns a descriptive value of this bulk data reference, typically used in dump methods.
|
java.io.InputStream |
getInputStream()
returns an inputstream of the bulk data reference.
|
long |
getLength()
returns the length of this bulk data reference, i.o.w.
|
long |
getOffset()
returns the offset in the inputstream.
|
void |
release()
called by JDT when the inputstream is no longer needed.
|
void |
resolve()
resolves the BulkDataReference.
|
void resolve() throws java.io.IOException
java.io.IOException
- throw when resolving fails.long getOffset()
long getLength()
getInputStream()
. Implementations may return -1 as long as the
bulk data reference is not resolved.getLength
in interface DataElementValue
java.nio.ByteOrder getByteOrder()
java.io.InputStream getInputStream()
void release() throws java.io.IOException
java.io.IOException
java.lang.String getDescription()
getDescription
in interface DataElementValue