|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.io.InputStream
com.jkristian.io.FilteredByteInputStream
com.jkristian.io.FilteredCharInputStream
com.jkristian.io.StringFilterInputStream
public class StringFilterInputStream
A stream that gets input from a String, and optionally transforms it using filters.
This class is not thread-safe.
| Field Summary |
|---|
| Fields inherited from class com.jkristian.io.FilteredByteInputStream |
|---|
CHUNK_LENGTH |
| Constructor Summary | |
|---|---|
StringFilterInputStream(java.lang.String in)
Create a stream that encodes characters using the default encoding. |
|
StringFilterInputStream(java.lang.String in,
int chunkLength)
Create a stream that encodes characters using the default encoding. |
|
StringFilterInputStream(java.lang.String in,
java.lang.String encoding)
Create a stream that encodes characters using the named encoding. |
|
StringFilterInputStream(java.lang.String in,
java.lang.String encoding,
int chunkLength)
Create a stream that encodes characters using the named encoding. |
|
| Method Summary | |
|---|---|
void |
close()
|
protected int |
filterInput()
Copy data from the underlying String into the filter chain. |
static void |
main(java.lang.String[] args)
A unit test. |
protected boolean |
ready()
|
| Methods inherited from class com.jkristian.io.FilteredCharInputStream |
|---|
flush, getByteFilter, getCharFilter, setByteFilter, setCharFilter |
| Methods inherited from class com.jkristian.io.FilteredByteInputStream |
|---|
available, mark, markSupported, read, read, read, reset, skip |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StringFilterInputStream(java.lang.String in)
in - the String from which to read input characters
public StringFilterInputStream(java.lang.String in,
java.lang.String encoding)
throws java.io.UnsupportedEncodingException
in - the String from which to read input charactersencoding - the name of a supported character encoding
java.io.UnsupportedEncodingException
public StringFilterInputStream(java.lang.String in,
int chunkLength)
in - the String from which to read input characterschunkLength - the number of characters to process at a time
public StringFilterInputStream(java.lang.String in,
java.lang.String encoding,
int chunkLength)
throws java.io.UnsupportedEncodingException
in - the String from which to read input charactersencoding - the name of a supported character encodingchunkLength - the number of characters to process at a time
java.io.UnsupportedEncodingException| Method Detail |
|---|
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class FilteredCharInputStreamjava.io.IOExceptionprotected boolean ready()
ready in class FilteredByteInputStream
protected int filterInput()
throws java.io.IOException
filterInput in class FilteredByteInputStreamjava.io.IOException
public static void main(java.lang.String[] args)
throws java.io.IOException
java.io.IOException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||