|
activemq-cpp-3.3.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. | |
| virtual | ~InputStreamReader () |
| virtual void | close () |
| Closes this object and deallocates the appropriate resources. | |
| virtual bool | ready () const |
| Tells whether this stream is ready to be read. | |
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 ). | |
| virtual void | checkClosed () const |
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 decaf::io::InputStreamReader::~InputStreamReader | ( | ) | [virtual] |
| virtual void decaf::io::InputStreamReader::checkClosed | ( | ) | const [protected, virtual] |
| virtual void decaf::io::InputStreamReader::close | ( | ) | [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.
| virtual int decaf::io::InputStreamReader::doReadArrayBounded | ( | char * | buffer, |
| int | size, | ||
| int | offset, | ||
| int | length | ||
| ) | [protected, virtual] |
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 bool decaf::io::InputStreamReader::ready | ( | ) | const [virtual] |
Tells whether this stream is ready to be read.
| IOException | if an I/O error occurs. |
Reimplemented from decaf::io::Reader.