Package org.apache.batik.util.io
Class StringDecoder
- java.lang.Object
-
- org.apache.batik.util.io.StringDecoder
-
- All Implemented Interfaces:
CharDecoder
public class StringDecoder extends java.lang.Object implements CharDecoder
This class reads a string.- Version:
- $Id: StringDecoder.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Field Summary
Fields Modifier and Type Field Description protected intlengthThe number of chars in the string.protected intnextThe next char index.protected java.lang.StringstringThe string which contains the decoded characters.-
Fields inherited from interface org.apache.batik.util.io.CharDecoder
END_OF_STREAM
-
-
Constructor Summary
Constructors Constructor Description StringDecoder(java.lang.String s)Creates a new StringDecoder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()Disposes the associated resources.intreadChar()Reads the next character.
-
-
-
Method Detail
-
readChar
public int readChar() throws java.io.IOExceptionReads the next character.- Specified by:
readCharin interfaceCharDecoder- Returns:
- a character or END_OF_STREAM.
- Throws:
java.io.IOException
-
dispose
public void dispose() throws java.io.IOExceptionDisposes the associated resources.- Specified by:
disposein interfaceCharDecoder- Throws:
java.io.IOException
-
-