|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
org.webmacro.util.ByteBufferOutputStream
Constructor Summary | |
ByteBufferOutputStream(int size)
Create a new ByteBuffer with the specified capacity |
Method Summary | |
void |
ensureCapacity(int len)
Make sure the buffer contains space for len more bytes. |
byte[] |
getBuffer()
Get the bytes in the buffer. |
byte[] |
getBytes()
Allocate a new byte[] and fill it with the contents of the current byte buffer. |
static void |
main(java.lang.String[] arg)
|
void |
reset()
Clear the contents of the byte buffer. |
int |
size()
How many bytes currently in the buffer |
java.lang.String |
toString()
Convert the bytes to a String using the default encoding |
java.lang.String |
toString(java.lang.String encoding)
Convert the bytes to a String using the specified encodign |
void |
write(byte b)
Append a single byte |
void |
write(byte[] b)
Copy an array of bytes on to the end of the buffer |
void |
write(byte[] b,
int offset,
int len)
Copy an array of bytes on to the end of the buffer |
void |
write(int i)
|
void |
writeTo(java.io.OutputStream out)
Write the bytes to the specified output stream |
Methods inherited from class java.io.OutputStream |
close, flush |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ByteBufferOutputStream(int size)
Method Detail |
public void reset()
public void write(int i)
public void write(byte[] b)
public void write(byte[] b, int offset, int len)
public void write(byte b)
public final void ensureCapacity(int len)
public int size()
public byte[] getBuffer()
public byte[] getBytes()
public java.lang.String toString()
public java.lang.String toString(java.lang.String encoding) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
public void writeTo(java.io.OutputStream out) throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] arg)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |