org.ajax4jsf.io
public class FastBufferWriter extends Writer
| Constructor and Description |
|---|
FastBufferWriter()
Creates instance of default initial capacity.
|
FastBufferWriter(CharBuffer firstBuffer)
Creates instance for an already existing chain of char arrays.
|
FastBufferWriter(int initialSize)
Creates instance with required initial capacity.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
FastBufferOutputStream |
convertToOutputStream()
Returns instance of FastBufferOutputStream containing all data written to this writer.
|
FastBufferOutputStream |
convertToOutputStream(String encoding)
Returns instance of FastBufferOutputStream containing all data written to this writer.
|
void |
flush() |
CharBuffer |
getFirstBuffer()
Returns the first link of the chain of char arrays.
|
int |
getLength()
Returns the total number of written chars.
|
void |
printTo(javax.servlet.ServletOutputStream outputStream) |
void |
reset()
Resets writer to empty state
|
char[] |
toCharArray()
Writes all data written up to the moment to string buffer.
|
void |
write(char[] cbuf) |
void |
write(char[] cbuf,
int off,
int len) |
void |
write(int c) |
void |
writeTo(Writer writer)
Writes all data written up to the moment to out.
|
public FastBufferWriter()
public FastBufferWriter(CharBuffer firstBuffer)
firstBuffer - public FastBufferWriter(int initialSize)
initialSize - public void write(int c)
throws IOException
write in class WriterIOExceptionWriter.write(int)public void write(char[] cbuf)
throws IOException
write in class WriterIOExceptionWriter.write(char[])public void write(char[] cbuf,
int off,
int len)
throws IOException
write in class WriterIOExceptionWriter.write(char[], int, int)public int getLength()
public CharBuffer getFirstBuffer()
public void close()
throws IOException
close in interface Closeableclose in class WriterIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class WriterIOExceptionpublic char[] toCharArray()
IOExceptionpublic void writeTo(Writer writer) throws IOException
writer - IOExceptionpublic void printTo(javax.servlet.ServletOutputStream outputStream)
throws IOException
IOExceptionpublic FastBufferOutputStream convertToOutputStream(String encoding) throws UnsupportedEncodingException
encoding - UnsupportedEncodingExceptionpublic FastBufferOutputStream convertToOutputStream()
public void reset()
Copyright © 2015 JBoss by Red Hat. All Rights Reserved.