org.openjena.atlas.io
Class StreamUTF8

java.lang.Object
  extended by java.io.Reader
      extended by org.openjena.atlas.io.StreamUTF8
All Implemented Interfaces:
java.io.Closeable, java.lang.Readable, CharStream

public final class StreamUTF8
extends java.io.Reader
implements CharStream

Fast and streaming. Does not guarantee the character is legal or defined; this is just the UTF-8 encoding rules.


Constructor Summary
StreamUTF8(java.io.InputStream in)
           
StreamUTF8(InputStreamBuffered in)
           
 
Method Summary
 int advance()
           
static int advance(InputStreamBuffered input)
           
static int advance(InputStreamBuffered input, int x)
           
 void close()
           
 void closeStream()
          Close the stream - different name from java.io.Reader.close
static java.lang.String decode(byte[] bytes)
           
 int read()
           
 int read(char[] cbuf, int off, int len)
           
 boolean ready()
           
 
Methods inherited from class java.io.Reader
mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamUTF8

public StreamUTF8(java.io.InputStream in)

StreamUTF8

public StreamUTF8(InputStreamBuffered in)
Method Detail

ready

public boolean ready()
              throws java.io.IOException
Overrides:
ready in class java.io.Reader
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Specified by:
close in class java.io.Reader
Throws:
java.io.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)
         throws java.io.IOException
Specified by:
read in class java.io.Reader
Throws:
java.io.IOException

read

public final int read()
               throws java.io.IOException
Overrides:
read in class java.io.Reader
Throws:
java.io.IOException

advance

public final int advance()
Specified by:
advance in interface CharStream

advance

public static final int advance(InputStreamBuffered input)

advance

public static final int advance(InputStreamBuffered input,
                                int x)

decode

public static java.lang.String decode(byte[] bytes)


Copyright © 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP