|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.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 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. |
String |
toString()
Converts the buffer's contents into a string, translating bytes into characters according to the platform's default character encoding. |
String |
toString(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(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 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 IOException
write
in class OutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
IOException
public void write(int b) throws IOException
write
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in class OutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void reset()
public int size()
public byte[] toByteArray()
public String toString()
toString
in class Object
public String toString(String enc) throws UnsupportedEncodingException
UnsupportedEncodingException
public void writeTo(OutputStream out) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |