Compoze Software, Inc.

com.compoze.util
Class ReaderInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended bycom.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.


Constructor Summary
ReaderInputStream(java.io.Reader reader)
          Constructor.
 
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
 

Constructor Detail

ReaderInputStream

public ReaderInputStream(java.io.Reader reader)
Constructor.

Parameters:
reader - the underlying reader
Method Detail

read

public int read()
         throws java.io.IOException
Read the next byte of data from the input stream.

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.

Parameters:
array - the array to read into
Returns:
the number of bytes read
Throws:
java.io.IOException

read

public int read(byte[] array,
                int iOffset,
                int iLength)
         throws java.io.IOException
Read an array of bytes from the input stream.

Parameters:
array - the array to read into
iOffset - the offset in the array to read to
iLength - the number of bytes to read
Returns:
the number of bytes read
Throws:
java.io.IOException

Compoze Software, Inc.

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.