This class implements a buffering mechanism that is used when writing large elements that reside in file into an output stream.
More...
This class implements a buffering mechanism that is used when writing large elements that reside in file into an output stream.
DcmElement::getPartialValue is used to fill the buffer maintained by this class, and the buffer content is then copied to the output stream. The intermediate buffer is necessary because both DcmElement::getPartialValue and DcmOutputStream::write expect a buffer to write to and read from, respectively.
◆ bufferIsEmpty()
OFBool DcmWriteCache::bufferIsEmpty |
( |
| ) |
const |
|
inline |
check whether the buffer is currently empty
- Returns
- true if buffer is empty, false otherwise
◆ contentLength()
Uint32 DcmWriteCache::contentLength |
( |
| ) |
const |
|
inline |
return the number of bytes of user data currently in buffer
- Returns
- number of bytes of user data currently in buffer
◆ fillBuffer()
fill buffer from given DICOM element if buffer is currently empty.
This method uses DcmElement::getPartialValue to fill the buffer from the given DICOM element at the given offset (which is updated to reflect the number of bytes read into the buffer).
- Parameters
-
elem | DICOM element to read from |
- Returns
- EC_Normal if successful, an error code otherwise
◆ init()
void DcmWriteCache::init |
( |
void * |
owner, |
|
|
Uint32 |
fieldLength, |
|
|
Uint32 |
bytesTransferred, |
|
|
E_ByteOrder |
byteOrder |
|
) |
| |
initialize the buffer maintained by this class.
Can safely be called multiple times.
- Parameters
-
owner | current "owner" (DcmElement instance using this buffer) |
fieldLength | number of bytes of user data in DICOM element |
bytesTransferred | number of bytes of user data in DICOM element that have already been transferred |
byteOrder | byteOrder desired byte order in buffer |
◆ writeBuffer()
write buffer content to output stream
- Parameters
-
outStream | output stream to write to |
- Returns
- number of bytes written
The documentation for this class was generated from the following file:
- dcmdata/include/dcmtk/dcmdata/dcwcache.h