/** * {@inheritDoc} */ @Override public int readyData() { return inputBuffer.available(); }
/** * {@inheritDoc} */ @Override public int read(byte[] b) throws IOException { return inputBuffer.read(b, 0, b.length); }
/** * Skips the specified number of bytes/characters. * * @see java.io.InputStream#skip(long) * @see java.io.Reader#skip(long) * * @deprecated pls. use {@link #skip(long)}, the <tt>block</tt> parameter will be ignored */ public long skip(final long n, @SuppressWarnings("UnusedParameters") final boolean block) throws IOException { return skip(n); }
/** * Depending on the <tt>InputBuffer</tt> mode, method will return either * number of available bytes or characters ready to be read without blocking. * * @return depending on the <tt>InputBuffer</tt> mode, method will return * either number of available bytes or characters ready to be read without * blocking. */ public int readyData() { if (closed) return 0; return ((processingChars) ? availableChar() : available()); }
/** * {@inheritDoc} */ @Override public void mark(int readlimit) { inputBuffer.mark(readlimit); }
/** * {@inheritDoc} */ @Override public void reset() throws IOException { inputBuffer.reset(); }
/** * {@inheritDoc} */ @Override public boolean isFinished() { return inputBuffer.isFinished(); }
/** * {@inheritDoc} */ @Override public void close() throws IOException { inputBuffer.close(); }
/** * {@inheritDoc} */ @Override public void notifyAvailable(ReadHandler handler, int size) { inputBuffer.notifyAvailable(handler, size); }
/** * Initiates asynchronous data receiving. * * This is service method, usually users don't have to call it explicitly. */ @Override public void initiateAsyncronousDataReceiving() { if (!checkChunkedMaxPostSize()) { final HttpContent brokenContent = HttpBrokenContent.builder(serverRequest.getRequest()) .error(new IOException("The HTTP request content exceeds max post size")) .build(); try { append(brokenContent); } catch (IOException ignored) { } return; } super.initiateAsyncronousDataReceiving(); }
/** * {@inheritDoc} */ @Override public int read() throws IOException { return inputBuffer.readByte(); }
/** * {@inheritDoc} */ @Override public void mark(int readlimit) { inputBuffer.mark(readlimit); }
/** * {@inheritDoc} */ @Override public void reset() throws IOException { inputBuffer.reset(); }
/** * {@inheritDoc} */ @Override public boolean isFinished() { return inputBuffer.isFinished(); }
/** * {@inheritDoc} */ @Override public void close() throws IOException { inputBuffer.close(); }
/** * {@inheritDoc} */ @Override public void notifyAvailable(final ReadHandler handler, final int size) { inputBuffer.notifyAvailable(handler, size); }
/** * Initiates asynchronous data receiving. * * This is service method, usually users don't have to call it explicitly. */ @Override public void initiateAsyncronousDataReceiving() { if (!checkChunkedMaxPostSize()) { final HttpContent brokenContent = HttpBrokenContent.builder(serverRequest.getRequest()) .error(new IOException("The HTTP request content exceeds max post size")) .build(); try { append(brokenContent); } catch (IOException ignored) { } return; } super.initiateAsyncronousDataReceiving(); }
/** * {@inheritDoc} */ @Override public int read() throws IOException { return inputBuffer.readByte(); }