/** * Retrieves binary data from the body of the request as * a {@link ServletInputStream}, which * gives you the ability to read one line at a time. * * @return a {@link ServletInputStream} object containing * the body of the request * * @exception IllegalStateException if the {@link #getReader} method * has already been called for this request * * @exception IOException if an input or output exception occurred * */ public ServletInputStream getInputStream() throws IOException { if (_gotReader) { throw new IllegalStateException("getReader() has already been called for this request"); } initializeInputStream(); _gotInputStream = true; return _inputStream; }
/** * Retrieves binary data from the body of the request as * a {@link ServletInputStream}, which * gives you the ability to read one line at a time. * * @return a {@link ServletInputStream} object containing * the body of the request * * @exception IllegalStateException if the {@link #getReader} method * has already been called for this request * * @exception IOException if an input or output exception occurred * */ public ServletInputStream getInputStream() throws IOException { if (_gotReader) { throw new IllegalStateException("getReader() has already been called for this request"); } initializeInputStream(); _gotInputStream = true; return _inputStream; }
/** * Retrieves binary data from the body of the request as * a {@link ServletInputStream}, which * gives you the ability to read one line at a time. * * @return a {@link ServletInputStream} object containing * the body of the request * * @exception IllegalStateException if the {@link #getReader} method * has already been called for this request * * @exception IOException if an input or output exception occurred * */ public ServletInputStream getInputStream() throws IOException { if (_gotReader) { throw new IllegalStateException("getReader() has already been called for this request"); } initializeInputStream(); _gotInputStream = true; return _inputStream; }
/** * Returns the body of the request as a <code>BufferedReader</code> * that translates character set encodings. * @since [ 1221537 ] Patch: ServletUnitHttpRequest.getReader not implemented yet * @author Tim - timmorrow (SourceForge) * @return the reader **/ public BufferedReader getReader() throws IOException { if (_gotInputStream) { throw new IllegalStateException("getInputStream() has already been called on this request"); } if (_reader == null) { initializeInputStream(); String encoding = getCharacterEncoding(); if (encoding == null) { encoding = HttpUnitUtils.DEFAULT_CHARACTER_SET; } _reader = new BufferedReader(new InputStreamReader(_inputStream, encoding)); _gotReader = true; } return _reader; }
/** * Returns the body of the request as a <code>BufferedReader</code> * that translates character set encodings. * @since [ 1221537 ] Patch: ServletUnitHttpRequest.getReader not implemented yet * @author Tim - timmorrow (SourceForge) * @return the reader **/ public BufferedReader getReader() throws IOException { if (_gotInputStream) { throw new IllegalStateException("getInputStream() has already been called on this request"); } if (_reader == null) { initializeInputStream(); String encoding = getCharacterEncoding(); if (encoding == null) { encoding = HttpUnitUtils.DEFAULT_CHARACTER_SET; } _reader = new BufferedReader(new InputStreamReader(_inputStream, encoding)); _gotReader = true; } return _reader; }
/** * Returns the body of the request as a <code>BufferedReader</code> * that translates character set encodings. * @since [ 1221537 ] Patch: ServletUnitHttpRequest.getReader not implemented yet * @author Tim - timmorrow (SourceForge) * @return the reader **/ public BufferedReader getReader() throws IOException { if (_gotInputStream) { throw new IllegalStateException("getInputStream() has already been called on this request"); } if (_reader == null) { initializeInputStream(); String encoding = getCharacterEncoding(); if (encoding == null) { encoding = HttpUnitUtils.DEFAULT_CHARACTER_SET; } _reader = new BufferedReader(new InputStreamReader(_inputStream, encoding)); _gotReader = true; } return _reader; }