|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.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(java.lang.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(java.io.OutputStream out)
Writes all data written up to the moment to out. |
void |
writeTo(java.io.Writer out,
java.lang.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 java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionjava.io.OutputStream.write(int c)
public void write(byte[] b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionjava.io.OutputStream.write(byte b[])
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionjava.io.OutputStream.write(byte[] b, int off, int len)public int getLength()
public ByteBuffer getFirstBuffer()
public byte[] toByteArray()
public void writeTo(java.io.OutputStream out)
throws java.io.IOException
out -
java.io.IOException
public void writeTo(java.io.Writer out,
java.lang.String encoding)
throws java.io.IOException
out -
java.io.IOException
public FastBufferWriter convertToWriter(java.lang.String encoding)
throws java.io.UnsupportedEncodingException
encoding -
java.io.UnsupportedEncodingExceptionpublic FastBufferWriter convertToWriter()
public void reset()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||