StreamBuffer
Description:
[ CCode ( has_construct_function = false , type = "CamelStream*" ) ]
public StreamBuffer (Stream stream, StreamBufferMode mode)
public StreamBuffer (Stream stream, StreamBufferMode mode)
Create a new buffered stream of another stream.
A default buffer size (1024 bytes), automatically managed will be used for buffering.
The following values are available for mode
:
BUFFER, Buffer the input/output in blocks.
CAMEL_STREAM_BUFFER_NEWLINE
, Buffer on newlines (for output).
NONE, Perform no buffering.
Note that currently this is ignored and BUFFER is always used.
In addition, one of the following mode options should be or'd together with the buffering mode:
WRITE, Buffer in write mode. READ, Buffer in read mode.
Buffering can only be done in one direction for any buffer instance.
Parameters:
stream |
a Stream object to buffer |
mode |
Operational mode of buffered stream. |
Returns:
a newly created buffered stream. |