Decompresses files which are compressed in the bzip2 format (*.bz2) More...
#include <OpenMS/FORMAT/Bzip2Ifstream.h>
Public Member Functions | |
| Bzip2Ifstream () | |
| Default Constructor. More... | |
| Bzip2Ifstream (const char *filename) | |
| Detailed constructor with filename. More... | |
| virtual | ~Bzip2Ifstream () |
| Destructor. More... | |
| size_t | read (char *s, size_t n) |
| reads n bytes from the bzip2 compressed file into buffer s More... | |
| bool | streamEnd () const |
| indicates whether the read function can be used safely More... | |
| bool | isOpen () const |
| returns whether a file is open. More... | |
| void | open (const char *filename) |
| opens a file for reading (decompression) More... | |
| void | close () |
| closes current file. More... | |
Protected Member Functions | |
| Bzip2Ifstream (const Bzip2Ifstream &bzip2) | |
| Bzip2Ifstream & | operator= (const Bzip2Ifstream &bzip2) |
Protected Attributes | |
| FILE * | file_ |
| pointer to a FILE object. Necessary for opening the file More... | |
| BZFILE * | bzip2file_ |
| a pointer to a BZFILE object. Necessary for decompression More... | |
| size_t | n_buffer_ |
| counts the last read buffer More... | |
| int | bzerror_ |
| saves the last returned error by the read function More... | |
| bool | stream_at_end_ |
| true if end of file is reached More... | |
Decompresses files which are compressed in the bzip2 format (*.bz2)
| Bzip2Ifstream | ( | ) |
Default Constructor.
| Bzip2Ifstream | ( | const char * | filename | ) |
Detailed constructor with filename.
|
virtual |
Destructor.
|
protected |
| void close | ( | ) |
closes current file.
|
inline |
returns whether a file is open.
References Bzip2Ifstream::file_, and NULL.
Referenced by Bzip2InputStream::getIsOpen().
| void open | ( | const char * | filename | ) |
opens a file for reading (decompression)
|
protected |
| size_t read | ( | char * | s, |
| size_t | n | ||
| ) |
reads n bytes from the bzip2 compressed file into buffer s
| s | will be filled with bytes |
| n | is the size of the buffer s |
| Exception::ConversionError | is thrown if decompression fails |
| Exception::IllegalArgument | is thrown if no file for decompression is given. This can happen even happen if a file was already open but read until the end. |
|
inline |
indicates whether the read function can be used safely
References Bzip2Ifstream::stream_at_end_.
|
protected |
saves the last returned error by the read function
|
protected |
a pointer to a BZFILE object. Necessary for decompression
|
protected |
pointer to a FILE object. Necessary for opening the file
Referenced by Bzip2Ifstream::isOpen().
|
protected |
counts the last read buffer
|
protected |
true if end of file is reached
Referenced by Bzip2Ifstream::streamEnd().
| OpenMS / TOPP release 1.11.1 | Documentation generated on Thu Nov 14 2013 11:19:30 using doxygen 1.8.5 |