Esempio n. 1
0
  /**
   * Reads new bytes in the byte chunk.
   *
   * @param cbuf Byte buffer to be written to the response
   * @param off Offset
   * @param len Length
   * @throws IOException An underlying IOException occurred
   */
  @Override
  public int realReadBytes(byte cbuf[], int off, int len) throws IOException {

    if (closed) {
      return -1;
    }
    if (coyoteRequest == null) {
      return -1;
    }

    if (state == INITIAL_STATE) {
      state = BYTE_STATE;
    }

    int result = coyoteRequest.doRead(bb);

    return result;
  }