org.apache.myfaces.application.pss
Class FastStringWriter
java.lang.Object
java.io.Writer
org.apache.myfaces.application.pss.FastStringWriter
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable, java.lang.Appendable
- Direct Known Subclasses:
- BufferedStringWriter
public class FastStringWriter
- extends java.io.Writer
|
Field Summary |
protected java.lang.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 |
java.lang.StringBuffer |
getBuffer()
|
java.lang.String |
toString()
|
void |
write(char[] cbuf,
int off,
int len)
|
void |
write(java.lang.String str)
|
void |
write(java.lang.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 |
_buffer
protected java.lang.StringBuffer _buffer
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:
java.lang.IllegalArgumentException - if initialCapacity is less than zero
write
public void write(char[] cbuf,
int off,
int len)
throws java.io.IOException
- Specified by:
write in class java.io.Writer
- Throws:
java.io.IOException
flush
public void flush()
throws java.io.IOException
- noop
- Specified by:
flush in interface java.io.Flushable- Specified by:
flush in class java.io.Writer
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- noop
- Specified by:
close in interface java.io.Closeable- Specified by:
close in class java.io.Writer
- Throws:
java.io.IOException
write
public void write(java.lang.String str)
- Overrides:
write in class java.io.Writer
write
public void write(java.lang.String str,
int off,
int len)
- Overrides:
write in class java.io.Writer
getBuffer
public java.lang.StringBuffer getBuffer()
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.