Class UonReader

All Implemented Interfaces:
Closeable, AutoCloseable, Readable, Positionable

public final class UonReader extends ParserReader
Same functionality as ParserReader except automatically decoded %xx escape sequences.

Escape sequences are assumed to be encoded UTF-8. Extended Unicode (>က0) is supported.

If decoding is enabled, the following character replacements occur so that boundaries are not lost:

  • '&' -> ''
  • '=' -> ''
See Also:
  • Constructor Details

    • UonReader

      public UonReader(ParserPipe pipe, boolean decodeChars) throws IOException
      Constructor.
      Parameters:
      pipe - The parser input.
      decodeChars - Whether the input is URL-encoded.
      Throws:
      IOException - Thrown by underlying stream.
  • Method Details

    • read

      public final int read(char[] cbuf, int off, int len) throws IOException
      Description copied from class: ParserReader
      Subclasses can override this method to provide additional filtering.

      Default implementation simply calls the same method on the underlying reader.

      Overrides:
      read in class ParserReader
      Throws:
      IOException
    • unread

      public final UonReader unread() throws IOException
      Description copied from class: ParserReader
      Pushes the last read character back into the stream.
      Overrides:
      unread in class ParserReader
      Returns:
      This object.
      Throws:
      IOException - If a problem occurred trying to read from the reader.