1 17 18 package org.apache.coyote.http11.filters; 19 20 import java.io.IOException ; 21 22 import org.apache.tomcat.util.buf.ByteChunk; 23 24 import org.apache.coyote.InputBuffer; 25 import org.apache.coyote.Request; 26 import org.apache.coyote.http11.InputFilter; 27 28 34 public class VoidInputFilter implements InputFilter { 35 36 37 39 40 protected static final String ENCODING_NAME = "void"; 41 protected static final ByteChunk ENCODING = new ByteChunk(); 42 43 44 46 47 static { 48 ENCODING.setBytes(ENCODING_NAME.getBytes(), 0, ENCODING_NAME.length()); 49 } 50 51 52 54 55 57 58 63 public int doRead(ByteChunk chunk, Request req) 64 throws IOException { 65 66 return -1; 67 68 } 69 70 71 73 74 77 public void setRequest(Request request) { 78 } 79 80 81 84 public void setBuffer(InputBuffer buffer) { 85 } 86 87 88 91 public void recycle() { 92 } 93 94 95 99 public ByteChunk getEncodingName() { 100 return ENCODING; 101 } 102 103 104 113 public long end() 114 throws IOException { 115 return 0; 116 } 117 118 119 } 120 | Popular Tags |