/* */ 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; /* */ } /* */
/** * 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; }
/** * 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>. * * @return a buffered reader for the request * @exception IllegalStateException if <code>getInputStream()</code> * has already been called for this request * @exception IOException if an input/output error occurs */ @Override 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; }
/** * 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; }
/** * 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 */ @Override 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; }
/** * 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 */ @Override 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; }
/** * 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 */ @Override 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; }
/** * 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 */ @Override 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; }
/** * 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 */ @Override 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; }
/** * 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 */ @Override 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; }
/** * 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>. * * @return a buffered reader for the request * @exception IllegalStateException if <code>getInputStream()</code> * has already been called for this request * @exception IOException if an input/output error occurs */ @Override 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; }
/** * 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 MESSAGES.inputStreamAlreadyUsed(); if (applicationReader != null) { return applicationReader; } usingReader = true; inputBuffer.checkConverter(); if (reader == null) { reader = new CoyoteReader(inputBuffer); } return reader; }
public int realReadChars() throws IOException { checkConverter(); boolean eof = false; if (bb.remaining() <= 0) { int nRead = realReadBytes(); if (nRead < 0) { eof = true; } } if (markPos == -1) { clear(cb); } else { // Make sure there's enough space in the worst case makeSpace(bb.remaining()); if ((cb.capacity() - cb.limit()) == 0 && bb.remaining() != 0) { // We went over the limit clear(cb); markPos = -1; } } state = CHAR_STATE; conv.convert(bb, cb, this, eof); if (cb.remaining() == 0 && eof) { return -1; } else { return cb.remaining(); } }
/** * 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 */ @Override public BufferedReader getReader() throws IOException { if (usingInputStream) { throw new IllegalStateException(rb.getString(LogFacade.GETINPUTSTREAM_BEEN_CALLED_EXCEPTION)); } usingReader = true; try { inputBuffer.checkConverter(); } catch (UnsupportedCharsetException uce) { UnsupportedEncodingException uee = new UnsupportedEncodingException(uce.getMessage()); uee.initCause(uce); throw uee; } if (reader == null) { reader = new CoyoteReader(inputBuffer); } return reader; }
public int realReadChars() throws IOException { checkConverter(); boolean eof = false; if (bb.remaining() <= 0) { int nRead = realReadBytes(); if (nRead < 0) { eof = true; } } if (markPos == -1) { clear(cb); } else { // Make sure there's enough space in the worst case makeSpace(bb.remaining()); if ((cb.capacity() - cb.limit()) == 0 && bb.remaining() != 0) { // We went over the limit clear(cb); markPos = -1; } } state = CHAR_STATE; conv.convert(bb, cb, this, eof); if (cb.remaining() == 0 && eof) { return -1; } else { return cb.remaining(); } }