jodd.io
Class StringInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by jodd.io.StringInputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Serializable

public class StringInputStream
extends java.io.InputStream
implements java.io.Serializable

Simple InputStream subclass to fetch all bytes from a String.

See Also:
AsciiInputStream, Serialized Form

Field Summary
protected  int available
           
protected  int charOffset
           
protected  java.lang.String str
           
protected  int strOffset
           
 
Constructor Summary
StringInputStream(java.lang.String s)
           
 
Method Summary
 int available()
           
 int read()
           
 
Methods inherited from class java.io.InputStream
close, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

strOffset

protected int strOffset

charOffset

protected int charOffset

available

protected int available

str

protected java.lang.String str
Constructor Detail

StringInputStream

public StringInputStream(java.lang.String s)
Method Detail

read

public int read()
         throws java.io.IOException
Specified by:
read in class java.io.InputStream
Throws:
java.io.IOException

available

public int available()
              throws java.io.IOException
Overrides:
available in class java.io.InputStream
Throws:
java.io.IOException


Copyright © 2003-2012 Jodd Team