Java Code Examples for org.apache.tomcat.util.buf.ByteChunk#setByteOutputChannel()

The following examples show how to use org.apache.tomcat.util.buf.ByteChunk#setByteOutputChannel() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OutputBuffer.java    From Tomcat7.0.67 with Apache License 2.0 5 votes vote down vote up
/**
 * Alternate constructor which allows specifying the initial buffer size.
 *
 * @param size Buffer size to use
 */
public OutputBuffer(int size) {

    bb = new ByteChunk(size);
    bb.setLimit(size);
    bb.setByteOutputChannel(this);
    cb = new CharChunk(size);
    cb.setLimit(size);
    cb.setOptimizedWrite(false);
    cb.setCharOutputChannel(this);

}
 
Example 2
Source File: OutputBuffer.java    From tomcatsrc with Apache License 2.0 5 votes vote down vote up
/**
 * Alternate constructor which allows specifying the initial buffer size.
 *
 * @param size Buffer size to use
 */
public OutputBuffer(int size) {

    bb = new ByteChunk(size);
    bb.setLimit(size);
    bb.setByteOutputChannel(this);
    cb = new CharChunk(size);
    cb.setLimit(size);
    cb.setOptimizedWrite(false);
    cb.setCharOutputChannel(this);

}
 
Example 3
Source File: InternalOutputBuffer.java    From Tomcat7.0.67 with Apache License 2.0 4 votes vote down vote up
/**
 * Default constructor.
 */
public InternalOutputBuffer(Response response, int headerBufferSize) {

    this.response = response;

    buf = new byte[headerBufferSize];

    outputStreamOutputBuffer = new OutputStreamOutputBuffer();

    filterLibrary = new OutputFilter[0];
    activeFilters = new OutputFilter[0];
    lastActiveFilter = -1;

    socketBuffer = new ByteChunk();
    socketBuffer.setByteOutputChannel(this);

    committed = false;
    finished = false;

}
 
Example 4
Source File: InternalOutputBuffer.java    From tomcatsrc with Apache License 2.0 4 votes vote down vote up
/**
 * Default constructor.
 */
public InternalOutputBuffer(Response response, int headerBufferSize) {

    this.response = response;

    buf = new byte[headerBufferSize];

    outputStreamOutputBuffer = new OutputStreamOutputBuffer();

    filterLibrary = new OutputFilter[0];
    activeFilters = new OutputFilter[0];
    lastActiveFilter = -1;

    socketBuffer = new ByteChunk();
    socketBuffer.setByteOutputChannel(this);

    committed = false;
    finished = false;

}