com.compoze.util
Class ReaderInputStream
java.lang.Object
|
+--java.io.InputStream
|
+--com.compoze.util.ReaderInputStream
- public class ReaderInputStream
- extends java.io.InputStream
This class wraps an input stream with a reader. Warning: All
characters have their high order bytes stripped off.
Method Summary |
int |
read()
Read the next byte of data from the input stream. |
int |
read(byte[] array)
Read an array of bytes from the input stream. |
int |
read(byte[] array,
int iOffset,
int iLength)
Read an array of bytes from the input stream. |
Methods inherited from class java.io.InputStream |
available, close, mark, markSupported, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReaderInputStream
public ReaderInputStream(java.io.Reader reader)
- Constructor.
- Parameters:
reader
- the underlying reader
read
public int read()
throws java.io.IOException
- Read the next byte of data from the input stream.
- Overrides:
read
in class java.io.InputStream
- Returns:
- the next byte
- Throws:
java.io.IOException
- if an i/o error occurred
read
public int read(byte[] array)
throws java.io.IOException
- Read an array of bytes from the input stream.
- Overrides:
read
in class java.io.InputStream
- Parameters:
array
- the array to read into- Returns:
- the number of bytes read
read
public int read(byte[] array,
int iOffset,
int iLength)
throws java.io.IOException
- Read an array of bytes from the input stream.
- Overrides:
read
in class java.io.InputStream
- Parameters:
array
- the array to read intoiOffset
- the offset in the array to read toiLength
- the number of bytes to read- Returns:
- the number of bytes read
Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.