API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.io. CharArrayWriter View Source
Author(s)
Herb Jellinek
Since
JDK1.1
Version
1.25, 11/17/05
Serial
Hierarchy
 Object
      Writer
          CharArrayWriter
Implements
Subclasses
Description
public class CharArrayWriter
  This class implements a character buffer that can be used as an Writer.
See also:   
Constructors
public CharArrayWriter ()
Creates a new CharArrayWriter.
public CharArrayWriter (int initialSize)
  Creates a new CharArrayWriter with the specified initial size.
Methods
Hide/Show inherited methods
public CharArrayWriter append (char c) [Overrides Writer]
  Appends the specified character to this writer.
public CharArrayWriter append (CharSequence csq) [Overrides Writer]
  Appends the specified character sequence to this writer.
public CharArrayWriter append (CharSequence csq, int start, int end) [Overrides Writer]
  Appends a subsequence of the specified character sequence to this writer.
public void close () [Specified in Writer]
  Close the stream.
public void flush () [Specified in Writer]
Flush the stream.
public void reset ()
Resets the buffer so that you can use it again without throwing away the already allocated buffer.
public int size ()
  Returns the current size of the buffer.
public char toCharArray ()
  Returns a copy of the input data.
public String toString ()
  Converts input data to a string.
public void write (char[] cbuf) throws IOException [Inherited From Writer]
  Writes an array of characters.
public void write (char[] c, int off, int len) [Specified in Writer]
  Writes characters to the buffer.
public void write (int c) [Overrides Writer]
Writes a character to the buffer.
public void write (String str) throws IOException [Inherited From Writer]
  Writes a string.
public void write (String str, int off, int len) [Overrides Writer]
  Write a portion of a string to the buffer.
public void writeTo (Writer out) throws IOException
  Writes the contents of the buffer to another character stream.
Fields
Hide/Show inherited fields
protected char buf
The buffer where data is stored.
protected int count
The number of chars in the buffer.
protected Object lock [Inherited From Writer]
  The object used to synchronize operations on this stream.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar