org.apache.myfaces.application.pss
Class FastStringWriter

java.lang.Object
  extended by java.io.Writer
      extended by org.apache.myfaces.application.pss.FastStringWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable
Direct Known Subclasses:
BufferedStringWriter

public class FastStringWriter
extends Writer


Field Summary
protected  StringBuffer _buffer
           
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
FastStringWriter()
          Constructs a new FastStringWriter instance using the default capacity of 16.
FastStringWriter(int initialCapacity)
          Constructs a new FastStringWriter instance using the specified initialCapacity.
 
Method Summary
 void close()
          noop
 void flush()
          noop
 StringBuffer getBuffer()
           
 String toString()
           
 void write(char[] cbuf, int off, int len)
           
 void write(String str)
           
 void write(String str, int off, int len)
           
 
Methods inherited from class java.io.Writer
append, append, append, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_buffer

protected StringBuffer _buffer
Constructor Detail

FastStringWriter

public FastStringWriter()

Constructs a new FastStringWriter instance using the default capacity of 16.


FastStringWriter

public FastStringWriter(int initialCapacity)

Constructs a new FastStringWriter instance using the specified initialCapacity.

Parameters:
initialCapacity - specifies the initial capacity of the buffer
Throws:
IllegalArgumentException - if initialCapacity is less than zero
Method Detail

write

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

flush

public void flush()
           throws IOException
noop

Specified by:
flush in interface Flushable
Specified by:
flush in class Writer
Throws:
IOException

close

public void close()
           throws IOException
noop

Specified by:
close in interface Closeable
Specified by:
close in class Writer
Throws:
IOException

write

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

write

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

getBuffer

public StringBuffer getBuffer()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.