站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.5.1

ReaderInputStream (NetBeans Utilities API) - NetBeans API Javadoc 5.5.1

org.openide.util 6.8.31

org.openide.util.io
Class ReaderInputStream

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


Constructor Summary
ReaderInputStream(Reader reader)
          Creates new input stream from the given reader.
ReaderInputStream(Reader reader, String encoding)
          Creates new input stream from the given reader and encoding.
 
Method Summary
 int available()
           
 void close()
           
 int read()
           
 int read(byte[] b, int off, int len)
           
 
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
 

Constructor Detail

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 reader
encoding -
Throws:
IOException
Method Detail

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

org.openide.util 6.8.31

Built on March 26 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.