public class ReaderInputStream
extends java.io.InputStream
CharsetEncoder
class.Constructor and Description |
---|
ReaderInputStream(java.io.Reader reader)
Constructor.
|
ReaderInputStream(java.io.Reader reader,
CharacterSet characterSet)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close()
Closes the wrapped reader.
|
int |
read() |
int |
read(byte[] b,
int off,
int len) |
public ReaderInputStream(java.io.Reader reader) throws java.io.IOException
CharacterSet.ISO_8859_1
character set by
default.reader
- The reader to wrap as an input stream.java.io.IOException
public ReaderInputStream(java.io.Reader reader, CharacterSet characterSet) throws java.io.IOException
reader
- The reader to wrap as an input stream.characterSet
- The character set to use for encoding.java.io.IOException
public int available() throws java.io.IOException
available
in class java.io.InputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
java.io.IOException
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
Copyright © 2005-2020 Restlet.