DCMTK Version 3.7.0 OFFIS DICOM Toolkit

Public Member Functions | Private Member Functions | Private Attributes | List of all members
DcmInputBufferStream Class Reference

input stream that reads from a buffer of fixed length which must be provided by the caller. More...

Inheritance diagram for DcmInputBufferStream:

## Public Member Functions
| DcmInputBufferStream ()
| constructor
virtual | ~DcmInputBufferStream ()
| destructor
virtual DcmInputStreamFactory * | newFactory () const
| creates a new factory object for the current stream and stream position. More...
virtual void | setBuffer (const void *buf, offile_off_t buflen)
| adds the content of the given buffer to the input stream. More...
virtual void | releaseBuffer ()
| releases the current buffer. More...
virtual void | setEos ()
| marks the end of stream, i.e. More...
Public Member Functions inherited from DcmInputStream
virtual | ~DcmInputStream ()
| destructor
virtual OFBool | good () const
| returns the status of the stream. More...
virtual OFCondition | status () const
| returns the status of the stream as an OFCondition object. More...
virtual OFBool | eos ()
| returns true if the producer is at the end of stream. More...
virtual offile_off_t | avail ()
| returns the minimum number of bytes that can be read with the next call to read(). More...
virtual offile_off_t | read (void *buf, offile_off_t buflen)
| reads as many bytes as possible into the given block. More...
virtual offile_off_t | skip (offile_off_t skiplen)
| skips over the given number of bytes (or less) More...
virtual offile_off_t | tell () const
| returns the total number of bytes read from the stream so far More...
virtual OFCondition | installCompressionFilter (E_StreamCompression filterType)
| installs a compression filter for the given stream compression type, which should be neither ESC_none nor ESC_unsupported. More...
virtual void | mark ()
| marks the current stream position for a later putback operation, overwriting a possibly existing prior putback mark. More...
virtual void | putback ()
| resets the stream to the position previously marked with setPutbackMark(). More...

## Private Member Functions
| DcmInputBufferStream (const DcmInputBufferStream &)
| private unimplemented copy constructor
DcmInputBufferStream & | operator= (const DcmInputBufferStream &)
| private unimplemented copy assignment operator

## Private Attributes
DcmBufferProducer | producer_
| the final producer of the filter chain

## Additional Inherited Members
Protected Member Functions inherited from DcmInputStream
| DcmInputStream (DcmProducer *initial)
| protected constructor, to be called from derived class constructor More...
const DcmProducer * | currentProducer () const
| returns pointer to current producer object

## Detailed Description

input stream that reads from a buffer of fixed length which must be provided by the caller.

## Member Function Documentation

## ◆ newFactory()

virtual DcmInputStreamFactory* DcmInputBufferStream::newFactory | ( |  | ) | const
| virtual

creates a new factory object for the current stream and stream position.

When activated, the factory will be able to create new DcmInputStream delivering the same data as the current stream. Used to defer loading of value fields until accessed. If no factory object can be created (e.g. because the stream is not seekable), returns NULL.

Returns
  pointer to new factory object if successful, NULL otherwise.

Implements DcmInputStream.

## ◆ releaseBuffer()

virtual void DcmInputBufferStream::releaseBuffer | ( |  | ) |
| virtual

releases the current buffer.

Should only be called when the content of the buffer has been read as far as possible. Pending input from the buffer is copied into an internal backup buffer if necessary. If an overflow condition occurs, the producer status becomes bad.

## ◆ setBuffer()

virtual void DcmInputBufferStream::setBuffer | ( | const void * | buf,
|  | offile_off_t | buflen
| ) |  |
| virtual

adds the content of the given buffer to the input stream.

Parameters

  buf | buffer from which data is read. Must be allocated by caller and remain valid until releaseBuffer() is called
  buflen | buffer length, must be even number > 0.

## ◆ setEos()

virtual void DcmInputBufferStream::setEos | ( |  | ) |
| virtual

marks the end of stream, i.e.

the data provided with the last call to setBuffer is the last data available in the stream.

The documentation for this class was generated from the following file:

- dcmdata/include/dcmtk/dcmdata/dcistrmb.h

Generated on Mon Dec 15 2025 for DCMTK Version 3.7.0 by Doxygen 1.9.1