| OpenMS 2.5.0

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

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

`#include <OpenMS/FORMAT/GzipInputStream.h>`

Inheritance diagram for GzipInputStream:

## Public Member Functions

| GzipInputStream (const String &file_name)
| Constructor. More...
| GzipInputStream (const char *const file_name)
| ~GzipInputStream () 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

| GzipInputStream ()
| GzipInputStream (const GzipInputStream &stream)
GzipInputStream & | operator= (const GzipInputStream &stream)

## Private Attributes

GzipIfstream * | gzip_
| 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 gzip compressed XML files.

## Constructor & Destructor Documentation

## ◆ GzipInputStream() [1/4]

GzipInputStream | ( | const String & | file_name | ) |

explicit

Constructor.

## ◆ GzipInputStream() [2/4]

GzipInputStream | ( | const char *const | file_name | ) |

explicit

## ◆ ~GzipInputStream()

~GzipInputStream | ( |  | ) |

override

Destructor.

## ◆ GzipInputStream() [3/4]

GzipInputStream | ( |  | ) |

private

## ◆ GzipInputStream() [4/4]

GzipInputStream | ( | const GzipInputStream & | stream | ) |

private

## Member Function Documentation

## ◆ curPos()

XMLFilePos curPos | ( |  | ) | const

inline override

returns the current position in the file

Note
  Implementation of the xerces-c input stream interface

References GzipInputStream::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 GzipInputStream::gzip_, and GzipIfstream::isOpen().

## ◆ operator=()

GzipInputStream& operator= | ( | const GzipInputStream & | 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_fill | is the buffer which is written to
  max_to_read | is the size of the buffer

Returns
  returns the number of bytes which were actually read

## Member Data Documentation

## ◆ file_current_index_

XMLSize_t file_current_index_

private

current index of the actual file

Referenced by GzipInputStream::curPos().

## ◆ gzip_

GzipIfstream* gzip_

private

pointer to an compression stream

Referenced by GzipInputStream::getIsOpen().