OpenMS  2.8.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Bzip2InputStream Class Reference

Implements the BinInputStream class of the xerces-c library in order to read bzip2 compressed XML files. More...

#include <OpenMS/FORMAT/Bzip2InputStream.h>

Inheritance diagram for Bzip2InputStream:
[legend]
Collaboration diagram for Bzip2InputStream:
[legend]

Public Member Functions

 Bzip2InputStream (const String &file_name)
 Constructor. More...
 
 Bzip2InputStream (const char *const file_name)
 
 ~Bzip2InputStream () override
 Destructor. More...
 
bool getIsOpen () const
 returns true if file is open More...
 
XMLFilePos curPos () const override
 returns the current position in the file More...
 
XMLSize_t readBytes (XMLByte *const to_fill, const XMLSize_t max_to_read) override
 writes bytes into buffer from file More...
 
const XMLCh * getContentType () const override
 returns 0 More...
 

Private Member Functions

 Bzip2InputStream ()
 
 Bzip2InputStream (const Bzip2InputStream &stream)
 
Bzip2InputStreamoperator= (const Bzip2InputStream &stream)
 

Private Attributes

Bzip2Ifstreambzip2_
 pointer to an compression stream More...
 
XMLSize_t file_current_index_
 current index of the actual file More...
 

Detailed Description

Implements the BinInputStream class of the xerces-c library in order to read bzip2 compressed XML files.

Constructor & Destructor Documentation

◆ Bzip2InputStream() [1/4]

Bzip2InputStream ( const String file_name)
explicit

Constructor.

◆ Bzip2InputStream() [2/4]

Bzip2InputStream ( const char *const  file_name)
explicit

◆ ~Bzip2InputStream()

~Bzip2InputStream ( )
override

Destructor.

◆ Bzip2InputStream() [3/4]

Bzip2InputStream ( )
private

◆ Bzip2InputStream() [4/4]

Bzip2InputStream ( const Bzip2InputStream stream)
private

Member Function Documentation

◆ curPos()

XMLFilePos curPos ( ) const
inlineoverride

returns the current position in the file

Note
Implementation of the xerces-c input stream interface

References Bzip2InputStream::file_current_index_.

◆ getContentType()

const XMLCh* getContentType ( ) const
override

returns 0

Note
Implementation of the xerces-c input stream interface

If no content type is provided for the data, 0 is returned (as is the case here, see xerces docs).

◆ getIsOpen()

bool getIsOpen ( ) const
inline

returns true if file is open

References Bzip2InputStream::bzip2_, and Bzip2Ifstream::isOpen().

◆ operator=()

Bzip2InputStream& operator= ( const Bzip2InputStream stream)
private

◆ readBytes()

XMLSize_t readBytes ( XMLByte *const  to_fill,
const XMLSize_t  max_to_read 
)
override

writes bytes into buffer from file

Note
Implementation of the xerces-c input stream interface
Parameters
to_fillis the buffer which is written to
max_to_readis the size of the buffer
Returns
returns the number of bytes which were actually read

Member Data Documentation

◆ bzip2_

Bzip2Ifstream* bzip2_
private

pointer to an compression stream

Referenced by Bzip2InputStream::getIsOpen().

◆ file_current_index_

XMLSize_t file_current_index_
private

current index of the actual file

Referenced by Bzip2InputStream::curPos().