Decompresses files which are compressed in the bzip2 format (*.bz2). More...
#include <OpenMS/FORMAT/Bzip2Ifstream.h>
Public Member Functions | |
| Bzip2Ifstream () | |
| Default Constructor. | |
| Bzip2Ifstream (const char *filename) | |
| Detailed constructor with filename. | |
| virtual | ~Bzip2Ifstream () |
| Destructor. | |
| size_t | read (char *s, size_t n) |
| reads n bytes from the bzip2 compressed file into buffer s | |
| bool | streamEnd () const |
| indicates whether the read function can be used safely | |
| bool | isOpen () const |
| returns whether a file is open. | |
| void | open (const char *filename) |
| opens a file for reading (decompression) | |
| void | close () |
| closes current file. | |
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 | |
| BZFILE * | bzip2file_ |
| a pointer to a BZFILE object. Necessary for decompression | |
| size_t | n_buffer_ |
| counts the last read buffer | |
| int | bzerror_ |
| saves the last returned error by the read function | |
| bool | stream_at_end_ |
| true if end of file is reached | |
Decompresses files which are compressed in the bzip2 format (*.bz2).
| Bzip2Ifstream | ( | ) |
Default Constructor.
| Bzip2Ifstream | ( | const char * | filename | ) |
Detailed constructor with filename.
| virtual ~Bzip2Ifstream | ( | ) | [virtual] |
Destructor.
| Bzip2Ifstream | ( | const Bzip2Ifstream & | bzip2 | ) | [protected] |
| void close | ( | ) |
closes current file.
| bool isOpen | ( | ) | const [inline] |
returns whether a file is open.
References Bzip2Ifstream::file_.
Referenced by Bzip2InputStream::getIsOpen().
| void open | ( | const char * | filename | ) |
opens a file for reading (decompression)
| Bzip2Ifstream& operator= | ( | const Bzip2Ifstream & | bzip2 | ) | [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. |
| bool streamEnd | ( | ) | const [inline] |
indicates whether the read function can be used safely
References Bzip2Ifstream::stream_at_end_.
int bzerror_ [protected] |
saves the last returned error by the read function
BZFILE* bzip2file_ [protected] |
a pointer to a BZFILE object. Necessary for decompression
FILE* file_ [protected] |
pointer to a FILE object. Necessary for opening the file
Referenced by Bzip2Ifstream::isOpen().
size_t n_buffer_ [protected] |
counts the last read buffer
bool stream_at_end_ [protected] |
true if end of file is reached
Referenced by Bzip2Ifstream::streamEnd().
| OpenMS / TOPP release 1.10.0 | Documentation generated on Thu Mar 7 2013 09:42:53 using doxygen 1.7.1 |