com.ibm.wbi.util
Class StringInputStream
java.lang.Object
|
+--java.io.InputStream
|
+--com.ibm.wbi.util.StringInputStream
Deprecated. This class is without redeeming value. If you truly
need its functionality, use the (also deprecated)
java.io.StringBufferInputStream, which is virtually identical.
However, you should probably really be using some kind of scheme
with a Reader/Writer.
- public class StringInputStream
- extends java.io.InputStream
Wraps a string in an input stream.
- See Also:
MegReader,
MegWriter
|
Constructor Summary |
StringInputStream()
Deprecated. Construct a default string input stream. |
StringInputStream(java.lang.String str)
Deprecated. Construct a new string input stream from the specified string. |
|
Method Summary |
int |
available()
Deprecated. Determine the available amount of bytes (chars) to read. |
void |
close()
Deprecated. Close the input stream. |
int |
read()
Deprecated. Read a single byte (char) from the input stream. |
long |
skip(long n)
Deprecated. Skip the specified amount of bytes (chars). |
| Methods inherited from class java.io.InputStream |
mark, markSupported, read, read, reset |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringInputStream
public StringInputStream()
- Deprecated.
- Construct a default string input stream.
StringInputStream
public StringInputStream(java.lang.String str)
- Deprecated.
- Construct a new string input stream from the specified string.
- Parameters:
str - The string.
available
public int available()
throws java.io.IOException
- Deprecated.
- Determine the available amount of bytes (chars) to read.
- Overrides:
available in class java.io.InputStream
- Returns:
- Available bytes (chars).
- Throws:
java.io.IOException - If an error occurs.
close
public void close()
throws java.io.IOException
- Deprecated.
- Close the input stream.
- Overrides:
close in class java.io.InputStream
- Throws:
java.io.IOException - If an error occurs.
read
public int read()
throws java.io.IOException
- Deprecated.
- Read a single byte (char) from the input stream.
- Overrides:
read in class java.io.InputStream
- Returns:
- The byte (char) or -1 if done.
- Throws:
java.io.IOException - If an error occurs.
skip
public long skip(long n)
throws java.io.IOException
- Deprecated.
- Skip the specified amount of bytes (chars).
- Overrides:
skip in class java.io.InputStream
- Parameters:
n - The desired amount to skip.- Returns:
- The actual amount skipped.
- Throws:
java.io.IOException - If an error occurs.