|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
org.wegra.io.ReaderInputStream
Field Summary | |
protected java.io.ByteArrayOutputStream |
fByteArrayOutputStream
|
protected byte[] |
fByteBuffer
|
protected char[] |
fCharBuffer
|
protected int |
fIndex
|
protected int |
fLength
|
protected java.io.Reader |
fReader
Internal Reader (data source) |
protected java.io.Writer |
fWriter
|
Constructor Summary | |
ReaderInputStream(java.io.Reader reader)
Created instance will use runtime platform's default encoding method. |
|
ReaderInputStream(java.io.Reader reader,
java.lang.String encoding)
Create one instance with specified encoding method. |
Method Summary | |
int |
available()
Returns available length of bytes in stream (WARNING: See the return value's description). |
void |
close()
Closes stream. |
protected void |
fillBuffer()
Fills buffer from internal reader object (fReader). |
int |
read()
Reads 1 byte and returns. |
int |
read(byte[] data,
int offset,
int length)
Reads bytes of length and fills it to given data at specified offset. |
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 |
Field Detail |
protected java.io.Reader fReader
protected java.io.ByteArrayOutputStream fByteArrayOutputStream
protected java.io.Writer fWriter
protected char[] fCharBuffer
protected byte[] fByteBuffer
protected int fIndex
protected int fLength
Constructor Detail |
public ReaderInputStream(java.io.Reader reader)
public ReaderInputStream(java.io.Reader reader, java.lang.String encoding) throws java.io.UnsupportedEncodingException
Method Detail |
public int available() throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException
public int read() throws java.io.IOException
java.io.IOException
public int read(byte[] data, int offset, int length) throws java.io.IOException
data
- Buffer to fill read bytesoffset
- Offset of data to fill firstlength
- Length to read
java.io.IOException
protected void fillBuffer() throws java.io.IOException
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |