| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private ByteBuffer | bb
The byte buffer. |
| private long | bytesWritten
Number of bytes written. |
| private final CharBuffer | cb
The char buffer. |
| private long | charsWritten
Number of chars written. |
| private volatile boolean | closed
Flag which indicates if the output buffer is closed. |
| protected C2BConverter | conv
Current char to byte converter. |
| private Response | coyoteResponse
Associated Coyote response. |
| public static final int | |
| private final int | defaultBufferSize
Default buffer size. |
| private boolean | doFlush
Do a flush on the next operation. |
| private final Map | encoders
Encoder cache. |
| private boolean | initial
State of the output buffer. |
| private static final StringManager | |
| private volatile boolean | suspended
Suspended flag. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | |
| private void | |
| private void | |
| public void | |
| public void | |
| private void | |
| public void | close()
Implements abstract java. Implements java. Close the output buffer. |
| private static C2BConverter | |
| protected void | doFlush(boolean
true if this should also cause a real network flushFlush bytes or chars contained in the buffer. |
| public void | flush()
Implements abstract java. Implements java. Flush bytes or chars contained in the buffer. |
| private void | |
| private void | |
| public int | |
| public long | |
| public boolean | |
| public boolean | |
| private boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public void | realWriteBytes(ByteBuffer
the ByteBuffer to be written to the response buf)Sends the buffer data to the client output, checking the state of Response and calling the right interceptors. |
| public void | realWriteChars(CharBuffer
Char buffer to be written to the response from)Convert the chars to bytes, then send the data to the client. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private int | |
| private int | |
| private int | |
| private void | |
| public void | |
| public void | |
| public void | write(int
int specifying a character to be written c)Overrides java. Writes a single character. |
| public void | write(char[]
Array of characters to be written c)Overrides java. Writes an array of characters. |
| public void | write(char[]
Array of characters c, int Offset from which to start writing characters off, int Number of characters to write len)Implements abstract java. Writes a portion of an array of characters. |
| public void | write(String
A String s, int Offset from which to start writing characters off, int Number of characters to write len)Overrides java. Append a string to the buffer |
| public void | |
| public void | |
| private void | |
| private void |
| bb | back to summary |
|---|---|
| private ByteBuffer bb The byte buffer. | |
| bytesWritten | back to summary |
|---|---|
| private long bytesWritten Number of bytes written. | |
| cb | back to summary |
|---|---|
| private final CharBuffer cb The char buffer. | |
| charsWritten | back to summary |
|---|---|
| private long charsWritten Number of chars written. | |
| closed | back to summary |
|---|---|
| private volatile boolean closed Flag which indicates if the output buffer is closed. | |
| conv | back to summary |
|---|---|
| protected C2BConverter conv Current char to byte converter. | |
| coyoteResponse | back to summary |
|---|---|
| private Response coyoteResponse Associated Coyote response. | |
| DEFAULT_BUFFER_SIZE | back to summary |
|---|---|
| public static final int DEFAULT_BUFFER_SIZE | |
| defaultBufferSize | back to summary |
|---|---|
| private final int defaultBufferSize Default buffer size. | |
| doFlush | back to summary |
|---|---|
| private boolean doFlush Do a flush on the next operation. | |
| encoders | back to summary |
|---|---|
| private final Map<Charset, C2BConverter> encoders Encoder cache. | |
| initial | back to summary |
|---|---|
| private boolean initial State of the output buffer. | |
| sm | back to summary |
|---|---|
| private static final StringManager sm | |
| suspended | back to summary |
|---|---|
| private volatile boolean suspended Suspended flag. All output bytes will be swallowed if this is true. | |
| OutputBuffer | back to summary |
|---|---|
| public OutputBuffer(int size) Create the buffer with the specified initial size.
| |
| append | back to summary |
|---|---|
| public void append(byte[] src, int off, int len) throws IOException Add data to the buffer.
| |
| append | back to summary |
|---|---|
| public void append(char[] src, int off, int len) throws IOException Add data to the buffer.
| |
| append | back to summary |
|---|---|
| public void append(ByteBuffer from) throws IOException | |
| appendByteArray | back to summary |
|---|---|
| private void appendByteArray(byte[] src, int off, int len) throws IOException | |
| appendByteBuffer | back to summary |
|---|---|
| private void appendByteBuffer(ByteBuffer from) throws IOException | |
| checkConverter | back to summary |
|---|---|
| public void checkConverter() throws IOException | |
| checkRegisterForWrite | back to summary |
|---|---|
| public void checkRegisterForWrite() | |
| clear | back to summary |
|---|---|
| private void clear(Buffer buffer) | |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements abstract java. Implements java. Close the output buffer. This tries to calculate the response size if the response has not been committed yet.
| |
| createConverter | back to summary |
|---|---|
| private static C2BConverter createConverter(final Charset charset) throws IOException | |
| doFlush | back to summary |
|---|---|
| protected void doFlush(boolean realFlush) throws IOException Flush bytes or chars contained in the buffer.
| |
| flush | back to summary |
|---|---|
| public void flush() throws IOException Implements abstract java. Implements java. Flush bytes or chars contained in the buffer.
| |
| flushByteBuffer | back to summary |
|---|---|
| private void flushByteBuffer() throws IOException | |
| flushCharBuffer | back to summary |
|---|---|
| private void flushCharBuffer() throws IOException | |
| getBufferSize | back to summary |
|---|---|
| public int getBufferSize() | |
| getContentWritten | back to summary |
|---|---|
| public long getContentWritten() | |
| isBlocking | back to summary |
|---|---|
| public boolean isBlocking() | |
| isClosed | back to summary |
|---|---|
| public boolean isClosed() Is the response output closed ?
| |
| isFull | back to summary |
|---|---|
| private boolean isFull(Buffer buffer) | |
| isNew | back to summary |
|---|---|
| public boolean isNew() Has this buffer been used at all?
| |
| isReady | back to summary |
|---|---|
| public boolean isReady() | |
| isSuspended | back to summary |
|---|---|
| public boolean isSuspended() Is the response output suspended ?
| |
| realWriteBytes | back to summary |
|---|---|
| public void realWriteBytes(ByteBuffer buf) throws IOException Sends the buffer data to the client output, checking the state of Response and calling the right interceptors.
| |
| realWriteChars | back to summary |
|---|---|
| public void realWriteChars(CharBuffer from) throws IOException Convert the chars to bytes, then send the data to the client.
| |
| recycle | back to summary |
|---|---|
| public void recycle() Recycle the output buffer. | |
| reset | back to summary |
|---|---|
| public void reset() | |
| reset | back to summary |
|---|---|
| public void reset(boolean resetWriterStreamFlags) | |
| setBufferSize | back to summary |
|---|---|
| public void setBufferSize(int size) | |
| setResponse | back to summary |
|---|---|
| public void setResponse(Response coyoteResponse) Associated Coyote response.
| |
| setSuspended | back to summary |
|---|---|
| public void setSuspended(boolean suspended) Set the suspended flag.
| |
| setWriteListener | back to summary |
|---|---|
| public void setWriteListener(WriteListener listener) | |
| toReadMode | back to summary |
|---|---|
| private void toReadMode(Buffer buffer) | |
| toWriteMode | back to summary |
|---|---|
| private void toWriteMode(Buffer buffer) | |
| transfer | back to summary |
|---|---|
| private void transfer(byte b, ByteBuffer to) | |
| transfer | back to summary |
|---|---|
| private void transfer(char b, CharBuffer to) | |
| transfer | back to summary |
|---|---|
| private int transfer(byte[] buf, int off, int len, ByteBuffer to) | |
| transfer | back to summary |
|---|---|
| private int transfer(char[] buf, int off, int len, CharBuffer to) | |
| transfer | back to summary |
|---|---|
| private int transfer(String s, int off, int len, CharBuffer to) | |
| transfer | back to summary |
|---|---|
| private void transfer(ByteBuffer from, ByteBuffer to) | |
| write | back to summary |
|---|---|
| public void write(byte[] b, int off, int len) throws IOException | |
| write | back to summary |
|---|---|
| public void write(ByteBuffer from) throws IOException | |
| write | back to summary |
|---|---|
| public void write(int c) throws IOException Overrides java. Doc from java. Writes a single character. The character to be written is contained in the 16 low-order bits of the given integer value; the 16 high-order bits are ignored. Subclasses that intend to support efficient single-character output should override this method.
| |
| write | back to summary |
|---|---|
| public void write(char[] c) throws IOException Overrides java. Doc from java. Writes an array of characters.
| |
| write | back to summary |
|---|---|
| public void write(char[] c, int off, int len) throws IOException Implements abstract java. Doc from java. Writes a portion of an array of characters.
| |
| write | back to summary |
|---|---|
| public void write(String s, int off, int len) throws IOException Overrides java. Append a string to the buffer
| |
| write | back to summary |
|---|---|
| public void write(String s) throws IOException Overrides java. Doc from java. Writes a string.
| |
| writeByte | back to summary |
|---|---|
| public void writeByte(int b) throws IOException | |
| writeBytes | back to summary |
|---|---|
| private void writeBytes(byte[] b, int off, int len) throws IOException | |
| writeBytes | back to summary |
|---|---|
| private void writeBytes(ByteBuffer from) throws IOException | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public C2BConverter |
| charset | back to summary |
|---|---|
| private final Charset charset | |
| PrivilegedCreateConverter | back to summary |
|---|---|
| pack-priv PrivilegedCreateConverter(Charset charset) | |
| run | back to summary |
|---|---|
| public C2BConverter run() throws IOException Implements java. Doc from java. Performs the computation. This method will be called by
| |