com.sun.faces.application
class ByteArrayWebOutputStream extends javax.servlet.ServletOutputStream
Modifier and Type | Class and Description |
---|---|
private static class |
ByteArrayWebOutputStream.DirectByteArrayOutputStream |
private static class |
ByteArrayWebOutputStream.NoOpOutputStream |
Modifier and Type | Field and Description |
---|---|
private ByteArrayWebOutputStream.DirectByteArrayOutputStream |
baos |
private boolean |
committed |
private static java.util.logging.Logger |
LOGGER |
static javax.servlet.ServletOutputStream |
NOOP_STREAM |
Constructor and Description |
---|
ByteArrayWebOutputStream() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
boolean |
isCommitted() |
void |
resetByteArray()
It's important to not expose this as reset.
|
byte[] |
toByteArray() |
void |
write(int n) |
void |
writeTo(java.io.OutputStream stream)
Write the buffered bytes to the provided OutputStream.
|
void |
writeTo(java.io.Writer writer,
java.lang.String encoding)
Converts the buffered bytes into chars based on the
specified encoding and writes them to the provided Writer.
|
public static final javax.servlet.ServletOutputStream NOOP_STREAM
private static final java.util.logging.Logger LOGGER
private ByteArrayWebOutputStream.DirectByteArrayOutputStream baos
private boolean committed
public void write(int n)
write
in class java.io.OutputStream
public void resetByteArray()
It's important to not expose this as reset.
public byte[] toByteArray()
public void writeTo(java.io.Writer writer, java.lang.String encoding)
writer
- target Writerencoding
- character encodingpublic boolean isCommitted()
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 writeTo(java.io.OutputStream stream)
Write the buffered bytes to the provided OutputStream.
stream
- the stream to write toCopyright © 2002-2010 Oracle America, Inc. All Rights Reserved.