public class StringInputStream
extends java.io.InputStream
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
text
The text to stream.
|
Constructor and Description |
---|
StringInputStream()
Constructor.
|
StringInputStream(java.lang.String text)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close() |
java.lang.String |
getText()
Returns the text to stream.
|
int |
read()
Reads the next character in the source text.
|
int |
read(char[] cbuf) |
int |
read(char[] cbuf,
int off,
int len) |
public StringInputStream()
public StringInputStream(java.lang.String text)
text
- 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 java.lang.String getText()
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(char[] cbuf) throws java.io.IOException
cbuf
- java.io.IOException
public int read(char[] cbuf, int off, int len) throws java.io.IOException
cbuf
- off
- len
- java.io.IOException
Copyright © 2005-2020 Restlet.