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

ReaderInputStream (NetBeans APIs) - NetBeans API Javadoc 4.1.0


org.openide.util.io
Class ReaderInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byorg.openide.util.io.ReaderInputStream

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

ReaderInputStream

public ReaderInputStream(Reader reader,
                         String encoding)
                  throws IOException
Creates new input stream from the given reader and encoding.

Parameters:
reader - Input reader
encoding -
Method Detail

read

public int read()
         throws IOException
Throws:
IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Throws:
IOException

available

public int available()
              throws IOException
Throws:
IOException

close

public void close()
           throws IOException
Throws:
IOException


Built on May 4 2005.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.