com.plumtree.openfoundation.io
Class XPInputStreamReader

java.lang.Object
  extended bycom.plumtree.openfoundation.io.XPInputStreamReader
Direct Known Subclasses:
XPFileReader

public class XPInputStreamReader
extends java.lang.Object

XPInputStreamReader is a wrapper over InputStreamReader.


Constructor Summary
XPInputStreamReader(java.io.InputStream stream)
          Creates a new XPInputStreamReader object that wraps the InputStream.
XPInputStreamReader(java.io.InputStreamReader reader)
          Creates a new XPInputStreamReader object that wraps the InputStreamReader.
XPInputStreamReader(java.io.InputStream stream, java.lang.String encoding)
          Creates a new XPInputStreamReader object that wraps the InputStream.
XPInputStreamReader(XPInputStream stream)
          Creates a new XPInputStreamReader object that wraps the XPInputStream.
 
Method Summary
 void Close()
          Close the stream.
 java.io.InputStreamReader GetUnderlyingObject()
          Returns the platform specific object that this class wraps.
 int Read()
          Read a single character.
 int Read(char[] buffer, int index, int count)
          Read characters into a portion of an array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPInputStreamReader

public XPInputStreamReader(java.io.InputStreamReader reader)
Creates a new XPInputStreamReader object that wraps the InputStreamReader.

Parameters:
reader - An instance of InputStreamReader

XPInputStreamReader

public XPInputStreamReader(java.io.InputStream stream)
Creates a new XPInputStreamReader object that wraps the InputStream.

Parameters:
stream - An instance of InputStream

XPInputStreamReader

public XPInputStreamReader(java.io.InputStream stream,
                           java.lang.String encoding)
Creates a new XPInputStreamReader object that wraps the InputStream.

Parameters:
stream - An instance of InputStream
encoding - The name of a supported charset

XPInputStreamReader

public XPInputStreamReader(XPInputStream stream)
Creates a new XPInputStreamReader object that wraps the XPInputStream.

Parameters:
stream - An instance of XPInputStream
Method Detail

Close

public void Close()
Close the stream.


GetUnderlyingObject

public java.io.InputStreamReader GetUnderlyingObject()
Returns the platform specific object that this class wraps.

Returns:
The underlying InputStream instance

Read

public int Read()
Read a single character.

Returns:
The character read, or -1 if end of the stream has been reached

Read

public int Read(char[] buffer,
                int index,
                int count)
Read characters into a portion of an array.

Parameters:
buffer - Destination buffer
index - Index of buffer at which to begin writing.
count - Maximum number of characters to read
Returns:
The number of characters read, or -1 if the end of the stream has been reached


Copyright © 2002, 2003, 2004 Plumtree Software Inc. All Rights Reserved.