package org.apache.coyote.http11;
import java.io.IOException;
-import java.io.InputStream;
import org.apache.coyote.InputBuffer;
import org.apache.coyote.Request;
/**
- * Underlying input stream.
- */
- protected InputStream inputStream;
-
-
- /**
* Underlying input buffer.
*/
protected InputBuffer inputStreamInputBuffer;
/**
- * Set the underlying socket input stream.
- */
- public void setInputStream(InputStream inputStream) {
-
- // FIXME: Check for null ?
-
- this.inputStream = inputStream;
-
- }
-
-
- /**
- * Get the underlying socket input stream.
- */
- public InputStream getInputStream() {
-
- return inputStream;
-
- }
-
-
- /**
* Add an input filter to the filter library.
*/
public void addFilter(InputFilter filter) {
// Recycle Request object
request.recycle();
- inputStream = null;
lastValid = 0;
pos = 0;
lastActiveFilter = -1;
import java.io.EOFException;
import java.io.IOException;
+import java.io.InputStream;
import java.nio.charset.Charset;
import org.apache.coyote.InputBuffer;
/**
+ * Underlying input stream.
+ */
+ protected InputStream inputStream;
+
+
+ /**
* Default constructor.
*/
public InternalInputBuffer(Request request, int headerBufferSize) {
}
+
+ /**
+ * Set the underlying socket input stream.
+ */
+ public void setInputStream(InputStream inputStream) {
+
+ // FIXME: Check for null ?
+
+ this.inputStream = inputStream;
+
+ }
+
+
+ /**
+ * Get the underlying socket input stream.
+ */
+ public InputStream getInputStream() {
+
+ return inputStream;
+
+ }
+
+
/**
* Read the request line. This function is meant to be used during the
* HTTP request header parsing. Do NOT attempt to read the request body
}
+ @Override
+ public void recycle() {
+ super.recycle();
+ inputStream = null;
+ }
+
+
// ------------------------------------------------------ Protected Methods