import java.util.HashMap;
import org.apache.catalina.security.SecurityUtil;
+import org.apache.catalina.util.StringManager;
import org.apache.coyote.ActionCode;
import org.apache.coyote.Request;
import org.apache.tomcat.util.buf.B2CConverter;
implements ByteChunk.ByteInputChannel, CharChunk.CharInputChannel,
CharChunk.CharOutputChannel {
+ /**
+ * The string manager for this package.
+ */
+ protected static StringManager sm =
+ StringManager.getManager(Constants.Package);
+
// -------------------------------------------------------------- Constants
public final int CHAR_STATE = 1;
public final int BYTE_STATE = 2;
-
// ----------------------------------------------------- Instance Variables
public int readByte()
throws IOException {
+
+ if (closed)
+ throw new IOException(sm.getString("inputBuffer.streamClosed"));
+
return bb.substract();
}
public int read(byte[] b, int off, int len)
throws IOException {
+
+ if (closed)
+ throw new IOException(sm.getString("inputBuffer.streamClosed"));
+
return bb.substract(b, off, len);
}
public int read()
throws IOException {
+
+ if (closed)
+ throw new IOException(sm.getString("inputBuffer.streamClosed"));
+
return cb.substract();
}
public int read(char[] cbuf)
throws IOException {
+
+ if (closed)
+ throw new IOException(sm.getString("inputBuffer.streamClosed"));
+
return read(cbuf, 0, cbuf.length);
}
public int read(char[] cbuf, int off, int len)
throws IOException {
+
+ if (closed)
+ throw new IOException(sm.getString("inputBuffer.streamClosed"));
+
return cb.substract(cbuf, off, len);
}
public long skip(long n)
throws IOException {
+
+ if (closed)
+ throw new IOException(sm.getString("inputBuffer.streamClosed"));
+
if (n < 0) {
throw new IllegalArgumentException();
}
public boolean ready()
throws IOException {
+
+ if (closed)
+ throw new IOException(sm.getString("inputBuffer.streamClosed"));
+
return (available() > 0);
}
public void mark(int readAheadLimit)
throws IOException {
+
+ if (closed)
+ throw new IOException(sm.getString("inputBuffer.streamClosed"));
+
if (cb.getLength() <= 0) {
cb.setOffset(0);
cb.setEnd(0);
public void reset()
throws IOException {
+
+ if (closed)
+ throw new IOException(sm.getString("inputBuffer.streamClosed"));
+
if (state == CHAR_STATE) {
if (markPos < 0) {
cb.recycle();
#
# CoyoteConnector
#
-
coyoteConnector.alreadyInitialized=The connector has already been initialized
coyoteConnector.alreadyStarted=The connector has already been started
coyoteConnector.cannotRegisterProtocol=Cannot register MBean for the Protocol
coyoteConnector.MapperRegistration=register Mapper: {0}
coyoteConnector.protocolUnregistrationFailed=Protocol handler stop failed
-
#
# CoyoteAdapter
#
-
coyoteAdapter.service=An exception or error occurred in the container during the request processing
coyoteAdapter.read=The servlet did not read all available bytes during the processing of the read event
#
# CoyoteResponse
#
-
coyoteResponse.getOutputStream.ise=getWriter() has already been called for this response
coyoteResponse.getWriter.ise=getOutputStream() has already been called for this response
coyoteResponse.resetBuffer.ise=Cannot reset buffer after response has been committed
#
# CoyoteRequest
#
-
coyoteRequest.getInputStream.ise=getReader() has already been called for this request
coyoteRequest.getReader.ise=getInputStream() has already been called for this request
coyoteRequest.sessionCreateCommitted=Cannot create a session after the response has been committed
coyoteRequest.attributeEvent=Exception thrown by attributes event listener
coyoteRequest.parseParameters=Exception thrown whilst processing POSTed parameters
coyoteRequest.postTooLarge=Parameters were not parsed because the size of the posted data was too big. Use the maxPostSize attribute of the connector to resolve this if the application should accept large POSTs.
+
requestFacade.nullRequest=The request object has been recycled and is no longer associated with this facade
+
responseFacade.nullResponse=The response object has been recycled and is no longer associated with this facade
+
cometEvent.nullRequest=The event object has been recycled and is no longer associated with a request
#
mapperListener.unregisterContext=Unregister Context {0}
mapperListener.registerWrapper=Register Wrapper {0} in Context {1}
-
-
+inputBuffer.streamClosed=Stream closed
\ No newline at end of file