Jive reference manual
List of all members | Public Member Functions | Protected Member Functions
jem::io::StringWriter Class Reference

#include <jem/io/StringWriter.h>

Inheritance diagram for jem::io::StringWriter:
Inheritance graph

Public Member Functions

 StringWriter (idx_t cap=64)
 
 StringWriter (const Self &rhs)
 
virtual Ref< Writerdup ()
 
virtual void write (int c)
 Writes a single character to this output stream. More...
 
virtual void write (int c, idx_t n)
 
virtual void write (const char *buf, idx_t n)
 
virtual void writeNoThrow (const char *buf, idx_t n)
 
virtual String toString () const
 Returns a short textual description of this object. More...
 
void reset ()
 
- Public Member Functions inherited from jem::io::Writer
virtual void lock ()
 Locks this output stream. More...
 
virtual void unlock ()
 Unlocks this output stream. More...
 
virtual int poll ()
 Returns the number of characters that can be written without blocking. More...
 
virtual void close ()
 Closes this output stream. More...
 
virtual void flush ()
 Writes any buffered data to this output stream. More...
 
virtual void write (int c, int n)
 Writes multiple copies of a character to this output stream. More...
 
virtual void write (const char *buf, int n)
 Writes an array of characters to this output stream. More...
 
virtual void writeNoThrow (const char *buf, int n)
 Writes a character array without throwing an exception. More...
 
virtual void printByte (byte b)
 Prints a formatted byte to this output stream. More...
 
virtual void printBool (bool b)
 Prints a formatted bool to this output stream. More...
 
virtual void printInt (long i)
 Prints a formatted integer to this output stream. More...
 
virtual void printFloat (double d)
 Prints a formatted double to this output stream. More...
 
- Public Member Functions inherited from jem::Object
virtual ClassgetClass () const
 Returns the Class instance representing the runtime class of this object. More...
 
virtual long hashValue () const
 Returns a hash value for this object. More...
 
virtual bool equals (const Ref< Object > &obj) const
 Tests whether two objects are equal. More...
 
Ref< Objectclone () const
 Returns a copy of this object. More...
 

Protected Member Functions

virtual ~StringWriter ()
 
- Protected Member Functions inherited from jem::Collectable
 Collectable ()
 Creates an empty Collectable. More...
 
 ~Collectable ()
 Frees resources. More...
 
- Protected Member Functions inherited from jem::Interface
virtual ~Interface ()
 Empty destructor. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from jem::Object
static ClassgetType ()
 Returns the Class instance representing the Object class. More...
 

Constructor & Destructor Documentation

jem::io::StringWriter::StringWriter ( idx_t  cap = 64)
explicit
jem::io::StringWriter::StringWriter ( const Self &  rhs)
virtual jem::io::StringWriter::~StringWriter ( )
protectedvirtual

Member Function Documentation

virtual Ref<Writer> jem::io::StringWriter::dup ( )
virtual
virtual void jem::io::StringWriter::write ( int  c)
virtual

Writes the integer c, cast to an unsigned char, to this output stream.

Parameters
c- the character to be written.
Exceptions
IOException- if an I/O error occurs.

Implements jem::io::TextOutput.

virtual void jem::io::StringWriter::write ( int  c,
idx_t  n 
)
virtual
virtual void jem::io::StringWriter::write ( const char *  buf,
idx_t  n 
)
virtual
virtual void jem::io::StringWriter::writeNoThrow ( const char *  buf,
idx_t  n 
)
virtual
virtual String jem::io::StringWriter::toString ( ) const
virtual

Returns a short textual description of this object. The toString method of the class Object returns:

getClass()->getName() + "@" + String( hashValue() )

Returns
A String representing this object.

Reimplemented from jem::Object.

void jem::io::StringWriter::reset ( )