Exemplo n.º 1
0
  /**
   * This method should be called if the InputBuffer is being used in conjunction with a {@link
   * java.io.Reader} implementation. If this method is not called, any character-based methods
   * called on this <code>InputBuffer</code> will throw a {@link IllegalStateException}.
   */
  public void processingChars() {

    if (!processingChars) {
      processingChars = true;
      final String enc = httpHeader.getCharacterEncoding();
      if (enc != null) {
        encoding = enc;
        final CharsetDecoder localDecoder = getDecoder();
        averageCharsPerByte = localDecoder.averageCharsPerByte();
      }
    }
  }