|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.io.InputStream
|
+--org.apache.tools.ant.filters.StringInputStream
Wraps a String as an InputStream.
| Constructor Summary | |
StringInputStream(java.lang.String source)
Composes a stream from a String |
|
StringInputStream(java.lang.String source,
java.lang.String encoding)
Composes a stream from a String with the specified encoding |
|
| Method Summary | |
int |
available()
|
void |
close()
Closes the Stringreader. |
void |
mark(int limit)
Marks the read limit of the StringReader. |
boolean |
markSupported()
|
int |
read()
Reads from the Stringreader, returning the same value. |
int |
read(byte[] b,
int off,
int len)
Reads from the Stringreader into a byte array |
void |
reset()
Resets the StringReader. |
| Methods inherited from class java.io.InputStream |
read, skip |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public StringInputStream(java.lang.String source)
source - The string to read from. Must not be null.
public StringInputStream(java.lang.String source,
java.lang.String encoding)
source - The string to read from. Must not be null.encoding - The encoding scheme.| Method Detail |
public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOException - if the original StringReader fails to be read
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamb - the byte array to read intooff - the offset in the byte arraylen - the length in the byte array to fill
java.io.IOException - if an error occurspublic void mark(int limit)
mark in class java.io.InputStreamlimit - the maximum limit of bytes that can be read before the
mark position becomes invalid
public int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOException - if an error occurspublic boolean markSupported()
markSupported in class java.io.InputStream
public void reset()
throws java.io.IOException
reset in class java.io.InputStreamjava.io.IOException - if the StringReader fails to be reset
public void close()
throws java.io.IOException
close in class java.io.InputStreamjava.io.IOException - if the original StringReader fails to be closed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||