![]() |
Chemical Data Processing Library Python API - Version 1.4.0
|
Output stream that transparently writes gzip-compressed data. More...
Inheritance diagram for CDPL.Util.GZipOStream:Public Member Functions | |
| None | __init__ () |
Contructs the GZipOStream instance. | |
| None | __init__ (Base.OStream os) |
Constructs a GZipOStream instance that will write compressed data to the output stream os. More... | |
| None | flush () |
| Flushes the internal buffer. | |
| None | write (object string) |
| Outputs the specified string. More... | |
| None | writelines (object iterable) |
| Outputs the specified sequence of strings. More... | |
| int | tellw () |
| Returns the current write position. More... | |
| None | seekw (int offs, int whence=0) |
| Sets the current write position. More... | |
| bool | isClosed () |
| Tells whether the stream has been closed. More... | |
| str | getOpenModeString () |
| Returns the open mode string that was provided as argument to the constructor. More... | |
| OpenMode | getOpenModeFlags () |
| Returns the open mode flags that were provided as argument to the constructor. More... | |
| bool | getSoftSpace () |
| Returns a boolean that indicates whether a space character needs to be printed before another value when using the print statement. More... | |
| None | setSoftSpace (bool value) |
| Sets a boolean that indicates whether a space character needs to be printed before another value when using the print statement. More... | |
| None | close () |
| Closes the stream. More... | |
| None | open (Base.OStream os) |
| Sets the output stream that receives the compressed data. More... | |
Public Member Functions inherited from CDPL.Base.OStream | |
| int | getObjectID () |
| Returns the numeric identifier (ID) of the wrapped C++ class instance. More... | |
Properties | |
| closed = property(isClosed) | |
| softspace = property(getSoftSpace, setSoftSpace) | |
| mode = property(getOpenModeString) | |
| modeFlags = property(getOpenModeFlags) | |
Properties inherited from CDPL.Base.OStream | |
| objectID = property(getObjectID) | |
Additional Inherited Members | |
Static Public Attributes inherited from CDPL.Base.OStream | |
| STD_OUT = _HIDDEN_VALUE_ | |
| The standard output stream of the current process. | |
| STD_ERR = _HIDDEN_VALUE_ | |
| The standard error stream of the current process. | |
Output stream that transparently writes gzip-compressed data.
| None CDPL.Util.GZipOStream.__init__ | ( | Base.OStream | os | ) |
Constructs a GZipOStream instance that will write compressed data to the output stream os.
| os | The output stream to write to. |
| None CDPL.Util.GZipOStream.write | ( | object | string | ) |
| None CDPL.Util.GZipOStream.writelines | ( | object | iterable | ) |
Outputs the specified sequence of strings.
| iterable | The string sequence to output (can be any iterable object producing strings, typically a list of strings). |
| int CDPL.Util.GZipOStream.tellw | ( | ) |
Returns the current write position.
| None CDPL.Util.GZipOStream.seekw | ( | int | offs, |
| int | whence = 0 |
||
| ) |
Sets the current write position.
The whence argument is optional and defaults to 0 (absolute positioning). Other supported values are 1 to seek relative to the current position and 2 for seeking relative to the end of input.
| offs | The offset to use for the seek operation. |
| whence | Value specifying how to calculate the final write position. |
| bool CDPL.Util.GZipOStream.isClosed | ( | ) |
Tells whether the stream has been closed.
| str CDPL.Util.GZipOStream.getOpenModeString | ( | ) |
Returns the open mode string that was provided as argument to the constructor.
| OpenMode CDPL.Util.GZipOStream.getOpenModeFlags | ( | ) |
Returns the open mode flags that were provided as argument to the constructor.
| bool CDPL.Util.GZipOStream.getSoftSpace | ( | ) |
Returns a boolean that indicates whether a space character needs to be printed before another value when using the print statement.
True if a space character needs to be printed before another value when using the print statement, and False otherwise. | None CDPL.Util.GZipOStream.setSoftSpace | ( | bool | value | ) |
Sets a boolean that indicates whether a space character needs to be printed before another value when using the print statement.
| value | True if a space character shall be printed before another value when using the print statement, and False otherwise. |
| None CDPL.Util.GZipOStream.close | ( | ) |
Closes the stream.
A closed stream cannot be read from or written to anymore. Any operation which requires the stream to be open will raise a Base.ValueError after the stream has been closed. Calling close() more than once is allowed.
| None CDPL.Util.GZipOStream.open | ( | Base.OStream | os | ) |
Sets the output stream that receives the compressed data.
| os | The new output stream to write to. |