org.backsource.utils.io
Class ReaderInputStream
java.lang.Object
java.io.InputStream
org.backsource.utils.io.ReaderInputStream
- public class ReaderInputStream
- extends java.io.InputStream
An InputStream of of a Reader, which might no allways work.
Wrap your reader in an input stream. Sometime the API:s you use just don't give you a breake. One only gives you a Reader the other one want's an InputStream. Then you might want to use this class. But I only think it works on iso-8859-1 encoded files.
Stolen from somewhere?
- Version:
- $Revision: 1.1.1.1 $
|
Field Summary |
protected int |
begin
|
protected java.lang.String |
encoding
|
protected java.io.Reader |
rdr
|
protected byte[] |
slack
|
| Methods inherited from class java.io.InputStream |
mark, read, skip |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
rdr
protected java.io.Reader rdr
encoding
protected java.lang.String encoding
slack
protected byte[] slack
begin
protected int begin
ReaderInputStream
public ReaderInputStream(java.io.Reader rdr)
ReaderInputStream
public ReaderInputStream(java.io.Reader rdr,
java.lang.String encoding)
read
public int read()
throws java.io.IOException
- Throws:
java.io.IOException
read
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
- Throws:
java.io.IOException
available
public int available()
throws java.io.IOException
- Throws:
java.io.IOException
markSupported
public boolean markSupported()
reset
public void reset()
throws java.io.IOException
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2000-2004 Backsource. All Rights Reserved.