|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.OutputStream org.ajax4jsf.io.FastBufferOutputStream
public class FastBufferOutputStream
Class for writing to chain of byte arrays extending OutputStream.
Constructor Summary | |
---|---|
FastBufferOutputStream()
Creates instance of default initial capacity. |
|
FastBufferOutputStream(ByteBuffer firstBuffer)
Creates instance for an already existing chain of byte arrays. |
|
FastBufferOutputStream(int initialSize)
Creates instance with required initial capacity. |
Method Summary | |
---|---|
FastBufferWriter |
convertToWriter()
Returns instance of FastBufferWriter containing all data written to this output stream. |
FastBufferWriter |
convertToWriter(String encoding)
Returns instance of FastBufferWriter containing all data written to this output stream. |
ByteBuffer |
getFirstBuffer()
Returns the first link of the chain of byte arrays. |
int |
getLength()
Returns the total number of written bytes. |
void |
reset()
Resets stream to empty state |
byte[] |
toByteArray()
|
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int c)
|
void |
writeTo(OutputStream out)
Writes all data written up to the moment to out. |
void |
writeTo(Writer out,
String encoding)
Writes all data written up to the moment to out. |
Methods inherited from class java.io.OutputStream |
---|
close, flush |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FastBufferOutputStream()
public FastBufferOutputStream(ByteBuffer firstBuffer)
firstBuffer
- public FastBufferOutputStream(int initialSize)
initialSize
- Method Detail |
---|
public void write(int c) throws IOException
write
in class OutputStream
IOException
java.io.OutputStream.write(int c)
public void write(byte[] b) throws IOException
write
in class OutputStream
IOException
java.io.OutputStream.write(byte b[])
public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
IOException
java.io.OutputStream.write(byte[] b, int off, int len)
public int getLength()
public ByteBuffer getFirstBuffer()
public byte[] toByteArray()
public void writeTo(OutputStream out) throws IOException
out
-
IOException
public void writeTo(Writer out, String encoding) throws IOException
out
-
IOException
public FastBufferWriter convertToWriter(String encoding) throws UnsupportedEncodingException
encoding
-
UnsupportedEncodingException
public FastBufferWriter convertToWriter()
public void reset()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |