org.norther.tammi.acorn.io
Class CharSequenceWriter

java.lang.Object
  extended by java.io.Writer
      extended by org.norther.tammi.acorn.io.CharSequenceWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable

public class CharSequenceWriter
extends Writer

A character stream whose target is an appendable character sequence.

Author:
Ilkka Priha

Field Summary
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
CharSequenceWriter(CharSequence seq)
          Creates a new writer.
 
Method Summary
 void close()
           
 void flush()
           
 String toString()
           
 void write(char[] cbuf, int off, int len)
           
 void write(int c)
           
 void write(String str)
           
 void write(String str, int off, int len)
           
 
Methods inherited from class java.io.Writer
append, append, append, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CharSequenceWriter

public CharSequenceWriter(CharSequence seq)
Creates a new writer.

Parameters:
seq - the sequence.
Method Detail

write

public void write(int c)
           throws IOException
Overrides:
write in class Writer
Throws:
IOException

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws IOException
Specified by:
write in class Writer
Throws:
IOException

write

public void write(String str)
           throws IOException
Overrides:
write in class Writer
Throws:
IOException

write

public void write(String str,
                  int off,
                  int len)
           throws IOException
Overrides:
write in class Writer
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object

flush

public void flush()
Specified by:
flush in interface Flushable
Specified by:
flush in class Writer

close

public void close()
Specified by:
close in interface Closeable
Specified by:
close in class Writer


Copyright © 2004 The Norther Organization. All rights reserved.