activemq-cpp-3.9.0
|
An InputStreamReader is a bridge from byte streams to character streams. More...
#include <src/main/decaf/io/InputStreamReader.h>
Public Member Functions | |
InputStreamReader (InputStream *stream, bool own=false) | |
Create a new InputStreamReader that wraps the given InputStream. More... | |
virtual | ~InputStreamReader () |
virtual void | close () |
Closes this object and deallocates the appropriate resources. More... | |
virtual bool | ready () const |
Tells whether this stream is ready to be read. More... | |
![]() | |
virtual | ~Reader () |
virtual void | mark (int readAheadLimit) |
Marks the present position in the stream. More... | |
virtual bool | markSupported () const |
Tells whether this stream supports the mark() operation. More... | |
virtual void | reset () |
Resets the stream. More... | |
virtual long long | skip (long long count) |
Skips characters. More... | |
virtual int | read (std::vector< char > &buffer) |
Reads characters into an array. More... | |
virtual int | read (char *buffer, int size) |
Reads characters into an array, the method will attempt to read as much data as the size of the array. More... | |
virtual int | read (char *buffer, int size, int offset, int length) |
Reads characters into a portion of an array. More... | |
virtual int | read () |
Reads a single character. More... | |
virtual int | read (decaf::nio::CharBuffer *charBuffer) |
Attempts to read characters into the specified character buffer. More... | |
![]() | |
virtual | ~Closeable () |
![]() | |
virtual | ~Readable () |
Protected Member Functions | |
virtual int | doReadArrayBounded (char *buffer, int size, int offset, int length) |
Override this method to customize the functionality of the method read( unsigned char* buffer, int size, int offset, int length ). More... | |
virtual void | checkClosed () const |
![]() | |
Reader () | |
virtual int | doReadVector (std::vector< char > &buffer) |
Override this method to customize the functionality of the method read( std::vector<char>& buffer ). More... | |
virtual int | doReadArray (char *buffer, int length) |
Override this method to customize the functionality of the method read( char* buffer, std::size_t length ). More... | |
virtual int | doReadChar () |
Override this method to customize the functionality of the method read(). More... | |
virtual int | doReadCharBuffer (decaf::nio::CharBuffer *charBuffer) |
Override this method to customize the functionality of the method read( CharBuffer* charBuffer ). More... | |
An InputStreamReader is a bridge from byte streams to character streams.
For top efficiency, consider wrapping an InputStreamReader within a BufferedReader. For example:
BufferedReader* in = new BufferedReader( new InputStreamReader( System.in, false ), true );
decaf::io::InputStreamReader::InputStreamReader | ( | InputStream * | stream, |
bool | own = false |
||
) |
Create a new InputStreamReader that wraps the given InputStream.
stream | The InputStream to read from. (cannot be null). |
own | Does this object own the passed InputStream (defaults to false). |
NullPointerException | if the passed InputStream is NULL. |
|
virtual |
|
protectedvirtual |
|
virtual |
Closes this object and deallocates the appropriate resources.
The object is generally no longer usable after calling close.
IOException | if an error occurs while closing. |
Implements decaf::io::Closeable.
|
protectedvirtual |
Override this method to customize the functionality of the method read( unsigned char* buffer, int size, int offset, int length ).
All subclasses must override this method to provide the basic Reader functionality.
Implements decaf::io::Reader.
|
virtual |
Tells whether this stream is ready to be read.
IOException | if an I/O error occurs. |
Reimplemented from decaf::io::Reader.