Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

java::io::Writer Class Reference

Abstract class for writing to character streams. More...

#include <java_io_Writer.h>

Inheritance diagram for java::io::Writer:

Inheritance graph
[legend]
Collaboration diagram for java::io::Writer:

Collaboration graph
[legend]
List of all members.

Public Types

enum  {
  xmogDefaultFlags = xmog_base::GLOBAL, xmogMajorVersion = 3, xmogMinorVersion = 2, xmogPatchVersion = 9,
  xmogBuildNumber = 2047
}
typedef ::xmog_java_array_template<
::java::io::Writer
array1D
typedef ::xmog_java_array_template<
::xmog_java_array_template<
::java::io::Writer > > 
array2D

Public Member Functions

virtual void close (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Close the stream, flushing it first.
virtual void flush (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Flush the stream.
virtual void write (const ::xmog_java_char_array &cbuf, jint off, jint len,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Write a portion of an array of characters.
virtual void write (const ::java::lang::String &str, jint off, jint len,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Write a portion of a string.
virtual void write (const ::xmog_java_char_array &cbuf,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Write an array of characters.
virtual void write (const ::java::lang::String &str,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Write a string.
virtual void write (jint c,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Write a single character.
 Writer (::xmog_dummy _use_java_ctor,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Create a new character-stream writer whose critical sections will synchronize on the writer itself.
 Writer (const ::java::lang::Object &lock,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Create a new character-stream writer whose critical sections will synchronize on the given object.

Detailed Description

Abstract class for writing to character streams.

The only methods that a subclass must implement are write(char[], int, int), flush(), and close(). Most subclasses, however, will override some of the methods defined here in order to provide higher efficiency, additional functionality, or both.

Author:
Mark Reinhold


Constructor & Destructor Documentation

java::io::Writer::Writer const ::java::lang::Object lock,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
 

Create a new character-stream writer whose critical sections will synchronize on the given object.

Parameters:
lock Object to synchronize on.
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.

java::io::Writer::Writer ::xmog_dummy  _use_java_ctor,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
 

Create a new character-stream writer whose critical sections will synchronize on the writer itself.

Parameters:
_use_java_ctor indicates that you want to delegate to a Java constructor whose natural proxy conflicts with a C++ requirement.
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.


Member Function Documentation

virtual void java::io::Writer::close ::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[virtual]
 

Close the stream, flushing it first.

Once a stream has been closed, further write() or flush() invocations will cause an IOException to be thrown. Closing a previously-closed stream, however, has no effect.

Parameters:
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:

Reimplemented in java::io::PrintWriter.

virtual void java::io::Writer::flush ::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[virtual]
 

Flush the stream.

If the stream has saved any characters from the various write() methods in a buffer, write them immediately to their intended destination. Then, if that destination is another character or byte stream, flush it. Thus one flush() invocation will flush all the buffers in a chain of Writers and OutputStreams.

Parameters:
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:

Reimplemented in java::io::PrintWriter.

virtual void java::io::Writer::write const ::xmog_java_char_array cbuf,
jint  off,
jint  len,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[virtual]
 

Write a portion of an array of characters.

Parameters:
cbuf Array of characters
off Offset from which to start writing characters
len Number of characters to write
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:

Reimplemented in java::io::PrintWriter.

virtual void java::io::Writer::write const ::java::lang::String str,
jint  off,
jint  len,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[virtual]
 

Write a portion of a string.

Parameters:
str A String
off Offset from which to start writing characters
len Number of characters to write
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:

Reimplemented in java::io::PrintWriter.

virtual void java::io::Writer::write const ::xmog_java_char_array cbuf,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[virtual]
 

Write an array of characters.

Parameters:
cbuf Array of characters to be written
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:

Reimplemented in java::io::PrintWriter.

virtual void java::io::Writer::write const ::java::lang::String str,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[virtual]
 

Write a string.

Parameters:
str String to be written
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:

Reimplemented in java::io::PrintWriter.

virtual void java::io::Writer::write jint  c,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[virtual]
 

Write a single character.

The character to be written is contained in the 16 low-order bits of the given integer value; the 16 high-order bits are ignored.

Subclasses that intend to support efficient single-character output should override this method.

Parameters:
c int specifying a character to be written.
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:

Reimplemented in java::io::PrintWriter.


The documentation for this class was generated from the following file:
Generated on Fri Jun 16 10:19:18 2006 for JMS Courier for C++ by  doxygen 1.4.1