/** * Return true if bytes are available. */ public boolean isReadable() { return (inputBuffer.available() > 0); }
/** * Set the Coyote request. * * @param coyoteRequest The Coyote request */ public void setCoyoteRequest(org.apache.coyote.Request coyoteRequest) { this.coyoteRequest = coyoteRequest; inputBuffer.setRequest(coyoteRequest); }
@Override public void close() throws IOException { ib.close(); }
/* */ public BufferedReader getReader() /* */ throws IOException /* */ { /* 1124 */ if (this.usingInputStream) { /* 1125 */ throw new IllegalStateException(sm.getString("coyoteRequest.getReader.ise")); /* */ } /* */ /* 1128 */ this.usingReader = true; /* 1129 */ this.inputBuffer.checkConverter(); /* 1130 */ if (this.reader == null) { /* 1131 */ this.reader = new CoyoteReader(this.inputBuffer); /* */ } /* 1133 */ return this.reader; /* */ } /* */
inputBuffer.recycle(); usingInputStream = false; usingReader = false;
@Override public boolean ready() throws IOException { return ib.ready(); }
/** * Read bytes into the low level buffer. */ public int read() throws IOException { return (inputBuffer.realReadBytes(null, 0, 0)); }
@Override public Integer run() throws IOException { Integer integer = Integer.valueOf(inputBuffer.readByte()); return integer; } }
@Override public int read() throws IOException { return ib.read(); }
@Override public void mark(int readAheadLimit) throws IOException { ib.mark(readAheadLimit); }
/** * Read the Reader wrapping the input stream for this Request. The * default implementation wraps a <code>BufferedReader</code> around the * servlet input stream returned by <code>createInputStream()</code>. * * @exception IllegalStateException if <code>getInputStream()</code> * has already been called for this request * @exception IOException if an input/output error occurs */ public BufferedReader getReader() throws IOException { if (usingInputStream) throw new IllegalStateException (sm.getString("coyoteRequest.getReader.ise")); usingReader = true; inputBuffer.checkConverter(); if (reader == null) { reader = new CoyoteReader(inputBuffer); } return reader; }
asyncListeners.clear(); authType = null; inputBuffer.recycle(); usingInputStream = false; usingReader = false;
@Override public boolean ready() throws IOException { return ib.ready(); }
/** * Clear cached encoders (to save memory for Comet requests). */ public boolean read() throws IOException { return (inputBuffer.realReadBytes(null, 0, 0) > 0); }
@Override public Integer run() throws IOException{ Integer integer = Integer.valueOf(ib.readByte()); return integer; }
@Override public int read(char[] cbuf, int off, int len) throws IOException { return ib.read(cbuf, off, len); }
@Override public void mark(int readAheadLimit) throws IOException { ib.mark(readAheadLimit); }
/** * Return true if bytes are available. */ public boolean getAvailable() { return (inputBuffer.available() > 0); }
/** * Set the Coyote request. * * @param coyoteRequest The Coyote request */ public void setCoyoteRequest(org.apache.coyote.Request coyoteRequest) { this.coyoteRequest = coyoteRequest; inputBuffer.setRequest(coyoteRequest); }
/** * Read the Reader wrapping the input stream for this Request. The * default implementation wraps a <code>BufferedReader</code> around the * servlet input stream returned by <code>createInputStream()</code>. * * @exception IllegalStateException if <code>getInputStream()</code> * has already been called for this request * @exception IOException if an input/output error occurs */ public BufferedReader getReader() throws IOException { if (usingInputStream) throw new IllegalStateException (sm.getString("coyoteRequest.getReader.ise")); usingReader = true; inputBuffer.checkConverter(); if (reader == null) { reader = new CoyoteReader(inputBuffer); } return reader; }