Class InStreamUTF8

java.lang.Object
java.io.Reader
org.apache.jena.atlas.io.InStreamUTF8
All Implemented Interfaces:
Closeable, AutoCloseable, Readable, CharStream

public final class InStreamUTF8 extends Reader implements CharStream
Fast and streaming UTF-8
  • Constructor Details

  • Method Details

    • ready

      public boolean ready() throws IOException
      Overrides:
      ready in class Reader
      Throws:
      IOException
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in class Reader
      Throws:
      IOException
    • closeStream

      public void closeStream()
      Description copied from interface: CharStream
      Close the stream - different name from java.io.Reader.close
      Specified by:
      closeStream in interface CharStream
    • read

      public int read(char[] cbuf, int off, int len)
      Specified by:
      read in class Reader
    • read

      public final int read()
      Overrides:
      read in class Reader
    • advance

      public final int advance()
      Next codepoint, given the first byte of any UTF-8 byte sequence is already known. Not necessarily a valid char (this function can be used a straight UTF8 decoder)
      Specified by:
      advance in interface CharStream
    • advance

      public static final int advance(InputStreamBuffered input)
      Next codepoint
    • decode

      public static String decode(byte[] bytes)