当前页面:
在线文档首页 >
NetBeans API Javadoc 5.5.1
ReaderInputStream (NetBeans Utilities API) - NetBeans API Javadoc 5.5.1
org.openide.util.io
Class ReaderInputStream
java.lang.Object
java.io.InputStream
org.openide.util.io.ReaderInputStream
- All Implemented Interfaces:
- Closeable
public class ReaderInputStream
- extends InputStream
This class convert Reader to InputStream. It works by converting
the characters to the encoding specified in constructor parameter.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReaderInputStream
public ReaderInputStream(Reader reader)
throws IOException
- Creates new input stream from the given reader.
Uses the platform default encoding.
- Parameters:
reader - Input reader
- Throws:
IOException
ReaderInputStream
public ReaderInputStream(Reader reader,
String encoding)
throws IOException
- Creates new input stream from the given reader and encoding.
- Parameters:
reader - Input readerencoding -
- Throws:
IOException
read
public int read()
throws IOException
- Specified by:
read in class InputStream
- Throws:
IOException
read
public int read(byte[] b,
int off,
int len)
throws IOException
- Overrides:
read in class InputStream
- Throws:
IOException
available
public int available()
throws IOException
- Overrides:
available in class InputStream
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close in interface Closeable- Overrides:
close in class InputStream
- Throws:
IOException