org.axiondb.util
Class Utf8InputStreamConverter

java.lang.Object
  extended by java.io.InputStream
      extended by org.axiondb.util.Utf8InputStreamConverter
All Implemented Interfaces:
Closeable

public class Utf8InputStreamConverter
extends InputStream


Constructor Summary
Utf8InputStreamConverter(InputStream utf8Stream, String targetEncoding)
          Currently only supports "US-ASCII"
 
Method Summary
 int read()
          Returns a byte encoded as ASCII.
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utf8InputStreamConverter

public Utf8InputStreamConverter(InputStream utf8Stream,
                                String targetEncoding)
                         throws UnsupportedEncodingException
Currently only supports "US-ASCII"

Parameters:
targetEncoding - "US-ASCII"
Throws:
UnsupportedEncodingException
Method Detail

read

public int read()
         throws IOException
Returns a byte encoded as ASCII. If non-ASCII characters are encountered in the underlying UTF-8 stream, an IOException is thrown.

Specified by:
read in class InputStream
Throws:
IOException
See Also:
InputStream.read()