FileDocCategorySizeDatePackage
VoidInputFilter.javaAPI DocApache Tomcat 6.0.143391Fri Jul 20 04:20:30 BST 2007org.apache.coyote.http11.filters

VoidInputFilter

public class VoidInputFilter extends Object implements org.apache.coyote.http11.InputFilter
Void input filter, which returns -1 when attempting a read. Used with a GET, HEAD, or a similar request.
author
Remy Maucherat

Fields Summary
protected static final String
ENCODING_NAME
protected static final org.apache.tomcat.util.buf.ByteChunk
ENCODING
Constructors Summary
Methods Summary
public intavailable()
Amount of bytes still available in a buffer.

        return 0;
    
public intdoRead(org.apache.tomcat.util.buf.ByteChunk chunk, org.apache.coyote.Request req)
Write some bytes.

return
number of bytes written by the filter



    // ----------------------------------------------------- Static Initializer


     
        ENCODING.setBytes(ENCODING_NAME.getBytes(), 0, ENCODING_NAME.length());
    

        return -1;

    
public longend()
End the current request. It is acceptable to write extra bytes using buffer.doWrite during the execution of this method.

return
Should return 0 unless the filter does some content length delimitation, in which case the number is the amount of extra bytes or missing bytes, which would indicate an error. Note: It is recommended that extra bytes be swallowed by the filter.

        return 0;
    
public org.apache.tomcat.util.buf.ByteChunkgetEncodingName()
Return the name of the associated encoding; Here, the value is "void".

        return ENCODING;
    
public voidrecycle()
Make the filter ready to process the next request.

    
public voidsetBuffer(org.apache.coyote.InputBuffer buffer)
Set the next buffer in the filter pipeline.

    
public voidsetRequest(org.apache.coyote.Request request)
Set the associated reauest.