| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final ByteArrayWebOutputStream. | |
| private boolean | |
| private static final Logger | |
| public static final ServletOutputStream |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Overrides jakarta. Implements java. Closes this output stream and releases any system resources associated with this stream. |
| public void | flush()
Overrides java. Implements java. Flushes this output stream and forces any buffered output bytes to be written out. |
| public boolean | |
| public boolean | isReady()
Implements abstract jakarta. Returns |
| public void | |
| public void | setWriteListener(WriteListener
the wl)WriteListener that should be notified when it's possible to writeImplements abstract jakarta. Instructs the |
| public byte[] | |
| public void | write(int
the n)byte.Implements abstract java. Writes the specified byte to this output stream. |
| public void | |
| public void | writeTo(OutputStream
the stream to write to stream)Write the buffered bytes to the provided OutputStream. |
| baos | back to summary |
|---|---|
| private final ByteArrayWebOutputStream. | |
| committed | back to summary |
|---|---|
| private boolean committed | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| NOOP_STREAM | back to summary |
|---|---|
| public static final ServletOutputStream NOOP_STREAM | |
| ByteArrayWebOutputStream | back to summary |
|---|---|
| public ByteArrayWebOutputStream() | |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides jakarta. Implements java. Doc from jakarta. Closes this output stream and releases any system resources
associated with this stream. The general contract of
If this method is called when the output stream is in non-blocking mode, it will immediately return with the stream
effectively closed, even if the stream contains buffered data that is yet to be written to client. The container will
write this data out in the background. If this process fails the
| |
| flush | back to summary |
|---|---|
| public void flush() throws IOException Overrides java. Implements java. Doc from java. Flushes this output stream and forces any buffered output bytes
to be written out. The general contract of If the intended destination of this stream is an abstraction provided by the underlying operating system, for example a file, then flushing the stream guarantees only that bytes previously written to the stream are passed to the operating system for writing; it does not guarantee that they are actually written to a physical device such as a disk drive.
| |
| isCommitted | back to summary |
|---|---|
| public boolean isCommitted() | |
| isReady | back to summary |
|---|---|
| public boolean isReady() Implements abstract jakarta. Doc from jakarta. Returns
If this method returns
| |
| resetByteArray | back to summary |
|---|---|
| public void resetByteArray() It's important to not expose this as reset. | |
| setWriteListener | back to summary |
|---|---|
| public void setWriteListener(WriteListener wl) Implements abstract jakarta. Doc from jakarta. Instructs the
| |
| toByteArray | back to summary |
|---|---|
| public byte[] toByteArray() | |
| write | back to summary |
|---|---|
| public void write(int n) Implements abstract java. Doc from java. Writes the specified byte to this output stream. The general
contract for
| |
| writeTo | back to summary |
|---|---|
| public void writeTo(Writer writer, String encoding) Converts the buffered bytes into chars based on the specified encoding and writes them to the provided Writer. | |
| writeTo | back to summary |
|---|---|
| public void writeTo(OutputStream stream) Write the buffered bytes to the provided OutputStream.
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public ByteBuffer | Returns: buf wrapped in a ByteBufferReturn the buffer backing this ByteArrayOutputStream as a ByteBuffer. |
| DirectByteArrayOutputStream | back to summary |
|---|---|
| public DirectByteArrayOutputStream(int initialCapacity) | |
| getByteBuffer | back to summary |
|---|---|
| public ByteBuffer getByteBuffer() Return the buffer backing this ByteArrayOutputStream as a ByteBuffer.
| |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Overrides jakarta. Implements java. Closes this output stream and releases any system resources associated with this stream. |
| public void | flush()
Overrides java. Implements java. Flushes this output stream and forces any buffered output bytes to be written out. |
| public boolean | isReady()
Implements abstract jakarta. Returns |
| public void | print(String
the s)String to send to the clientOverrides jakarta. Writes a |
| public void | print(boolean
the b)boolean value to send to the clientOverrides jakarta. Writes a |
| public void | print(char
the character to send to the client c)Overrides jakarta. Writes a character to the client, with no carriage return-line feed (CRLF) at the end. |
| public void | print(int
the int to send to the client i)Overrides jakarta. Writes an int to the client, with no carriage return-line feed (CRLF) at the end. |
| public void | print(long
the l)long value to send to the clientOverrides jakarta. Writes a |
| public void | print(float
the v)float value to send to the clientOverrides jakarta. Writes a |
| public void | print(double
the v)double value to send to the clientOverrides jakarta. Writes a |
| public void | println()
Overrides jakarta. Writes a carriage return-line feed (CRLF) to the client. |
| public void | println(String
the s)String to write to the clientOverrides jakarta. Writes a |
| public void | println(boolean
the b)boolean value to write to the clientOverrides jakarta. Writes a |
| public void | println(char
the character to write to the client c)Overrides jakarta. Writes a character to the client, followed by a carriage return-line feed (CRLF). |
| public void | println(int
the int to write to the client i)Overrides jakarta. Writes an int to the client, followed by a carriage return-line feed (CRLF) character. |
| public void | println(long
the l)long value to write to the clientOverrides jakarta. Writes a |
| public void | println(float
the v)float value to write to the clientOverrides jakarta. Writes a |
| public void | println(double
the v)double value to write to the clientOverrides jakarta. Writes a |
| public void | setWriteListener(WriteListener
the wl)WriteListener that should be notified when it's possible to writeImplements abstract jakarta. Instructs the |
| public void | write(int
the b)byte.Implements abstract java. Writes the specified byte to this output stream. |
| public void | write(byte[]
the data. b)Overrides java. Writes |
| public void | write(byte[]
the data. b, int the start offset in the data. off, int the number of bytes to write. len)Overrides java. Writes |
| NoOpOutputStream | back to summary |
|---|---|
| protected NoOpOutputStream() | |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides jakarta. Implements java. Doc from jakarta. Closes this output stream and releases any system resources
associated with this stream. The general contract of
If this method is called when the output stream is in non-blocking mode, it will immediately return with the stream
effectively closed, even if the stream contains buffered data that is yet to be written to client. The container will
write this data out in the background. If this process fails the
| |
| flush | back to summary |
|---|---|
| public void flush() throws IOException Overrides java. Implements java. Doc from java. Flushes this output stream and forces any buffered output bytes
to be written out. The general contract of If the intended destination of this stream is an abstraction provided by the underlying operating system, for example a file, then flushing the stream guarantees only that bytes previously written to the stream are passed to the operating system for writing; it does not guarantee that they are actually written to a physical device such as a disk drive.
| |
| isReady | back to summary |
|---|---|
| public boolean isReady() Implements abstract jakarta. Doc from jakarta. Returns
If this method returns
| |
| back to summary | |
|---|---|
| public void print(String s) throws IOException Overrides jakarta. Doc from jakarta. Writes a
| |
| back to summary | |
|---|---|
| public void print(boolean b) throws IOException Overrides jakarta. Doc from jakarta. Writes a
| |
| back to summary | |
|---|---|
| public void print(char c) throws IOException Overrides jakarta. Doc from jakarta. Writes a character to the client, with no carriage return-line feed (CRLF) at the end.
| |
| back to summary | |
|---|---|
| public void print(int i) throws IOException Overrides jakarta. Doc from jakarta. Writes an int to the client, with no carriage return-line feed (CRLF) at the end.
| |
| back to summary | |
|---|---|
| public void print(long l) throws IOException Overrides jakarta. Doc from jakarta. Writes a
| |
| back to summary | |
|---|---|
| public void print(float v) throws IOException Overrides jakarta. Doc from jakarta. Writes a
| |
| back to summary | |
|---|---|
| public void print(double v) throws IOException Overrides jakarta. Doc from jakarta. Writes a
| |
| println | back to summary |
|---|---|
| public void println() throws IOException Overrides jakarta. Doc from jakarta. Writes a carriage return-line feed (CRLF) to the client.
| |
| println | back to summary |
|---|---|
| public void println(String s) throws IOException Overrides jakarta. Doc from jakarta. Writes a
| |
| println | back to summary |
|---|---|
| public void println(boolean b) throws IOException Overrides jakarta. Doc from jakarta. Writes a
| |
| println | back to summary |
|---|---|
| public void println(char c) throws IOException Overrides jakarta. Doc from jakarta. Writes a character to the client, followed by a carriage return-line feed (CRLF).
| |
| println | back to summary |
|---|---|
| public void println(int i) throws IOException Overrides jakarta. Doc from jakarta. Writes an int to the client, followed by a carriage return-line feed (CRLF) character.
| |
| println | back to summary |
|---|---|
| public void println(long l) throws IOException Overrides jakarta. Doc from jakarta. Writes a
| |
| println | back to summary |
|---|---|
| public void println(float v) throws IOException Overrides jakarta. Doc from jakarta. Writes a
| |
| println | back to summary |
|---|---|
| public void println(double v) throws IOException Overrides jakarta. Doc from jakarta. Writes a
| |
| setWriteListener | back to summary |
|---|---|
| public void setWriteListener(WriteListener wl) Implements abstract jakarta. Doc from jakarta. Instructs the
| |
| write | back to summary |
|---|---|
| public void write(int b) throws IOException Implements abstract java. Doc from java. Writes the specified byte to this output stream. The general
contract for
| |
| write | back to summary |
|---|---|
| public void write(byte[] b) throws IOException Overrides java. Doc from java. Writes
| |
| write | back to summary |
|---|---|
| public void write(byte[] b, int off, int len) throws IOException Overrides java. Doc from java. Writes
If
If
| |