org.yajul.io
Class StringInputStream
java.lang.Object
java.io.InputStream
java.io.ByteArrayInputStream
org.yajul.io.StringInputStream
- All Implemented Interfaces:
- java.io.Closeable
public class StringInputStream
- extends java.io.ByteArrayInputStream
Provides an input stream that reads from a string. This implementation is
a very simple extension of ByteArrayInputStream.
(BTW, What's up with BEA's implementation of this class? Take a look at
it if you need a laugh).
User: jdavis
Date: Aug 12, 2003
Time: 3:03:00 PM
- Author:
- jdavis
Fields inherited from class java.io.ByteArrayInputStream |
buf, count, mark, pos |
Constructor Summary |
StringInputStream(java.lang.String s)
Creates a new StringInputStream that will read the supplied string. |
StringInputStream(java.lang.String s,
java.lang.String encoding)
Creates a new StringInputStream that will read the supplied string, given
the encoding. |
Methods inherited from class java.io.ByteArrayInputStream |
available, close, mark, markSupported, read, read, reset, skip |
Methods inherited from class java.io.InputStream |
read |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringInputStream
public StringInputStream(java.lang.String s)
- Creates a new StringInputStream that will read the supplied string.
- Parameters:
s
- The string to read.
StringInputStream
public StringInputStream(java.lang.String s,
java.lang.String encoding)
throws java.io.UnsupportedEncodingException
- Creates a new StringInputStream that will read the supplied string, given
the encoding.
- Parameters:
s
- The string to read.encoding
- The string encoding.
- Throws:
java.io.UnsupportedEncodingException
- If the supplied encoding is not
supported.
Copyright © 2008. All Rights Reserved.