net.ontopia.utils
Class ReaderInputStream
java.lang.Object
java.io.InputStream
net.ontopia.utils.ReaderInputStream
- All Implemented Interfaces:
- java.io.Closeable
public class ReaderInputStream
- extends java.io.InputStream
INTERNAL: An InputStream stream that turns a Reader into an
InputStream given an encoding.
Methods inherited from class java.io.InputStream |
mark, markSupported, read, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
reader
protected java.io.Reader reader
byteArrayOut
protected java.io.ByteArrayOutputStream byteArrayOut
writer
protected java.io.Writer writer
chars
protected char[] chars
buffer
protected byte[] buffer
index
protected int index
length
protected int length
ReaderInputStream
public ReaderInputStream(java.io.Reader reader)
ReaderInputStream
public ReaderInputStream(java.io.Reader reader,
java.lang.String encoding)
throws java.io.UnsupportedEncodingException
- Throws:
java.io.UnsupportedEncodingException
read
public int read()
throws java.io.IOException
- Specified by:
read
in class java.io.InputStream
- Throws:
java.io.IOException
fillBuffer
protected void fillBuffer()
throws java.io.IOException
- Throws:
java.io.IOException
read
public int read(byte[] data,
int off,
int len)
throws java.io.IOException
- Overrides:
read
in class java.io.InputStream
- Throws:
java.io.IOException
available
public int available()
throws java.io.IOException
- Overrides:
available
in class java.io.InputStream
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.InputStream
- Throws:
java.io.IOException
Copyright © 2000-2012 Ontopia.