|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
javax.servlet.ServletOutputStream
org.apache.commons.messagelet.impl.BufferedServletOutputStream
public class BufferedServletOutputStream
BufferedServletOutputStream
implements
a buffered ServletOutputStream in a similar way to
ByteArrayOutputStream represents a buffered OutputStream.
Field Summary | |
---|---|
protected java.io.ByteArrayOutputStream |
buffer
The underlying ByteArrayOutputStream that the output
is written to |
Constructor Summary | |
---|---|
BufferedServletOutputStream()
|
|
BufferedServletOutputStream(int size)
|
Method Summary | |
---|---|
void |
close()
|
void |
flush()
|
void |
reset()
Resets the count field of this buffer to zero, so that all currently accumulated output in the ouput stream is discarded. |
int |
size()
Returns the current size of the buffer. |
byte[] |
toByteArray()
Creates a newly allocated byte array. |
java.lang.String |
toString()
Converts the buffer's contents into a string, translating bytes into characters according to the platform's default character encoding. |
java.lang.String |
toString(java.lang.String enc)
Converts the buffer's contents into a string, translating bytes into characters according to the specified character encoding. |
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
void |
writeTo(java.io.OutputStream out)
Writes the complete contents of this buffer to the specified output stream argument, as if by calling the output stream's write method using out.write(buf, 0, count). |
Methods inherited from class javax.servlet.ServletOutputStream |
---|
print, print, print, print, print, print, print, println, println, println, println, println, println, println, println |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.io.ByteArrayOutputStream buffer
ByteArrayOutputStream
that the output
is written to
Constructor Detail |
---|
public BufferedServletOutputStream()
public BufferedServletOutputStream(int size)
Method Detail |
---|
public void write(byte[] b) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void write(byte[] b, int off, int len) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.OutputStream
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
public void reset()
public int size()
public byte[] toByteArray()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(java.lang.String enc) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
public void writeTo(java.io.OutputStream out) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |