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 int
length
The number of chars in the string.protected int
next
The next char index.protected java.lang.String
string
The 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 void
dispose()
Disposes the associated resources.int
readChar()
Reads the next character.
-
-
-
Method Detail
-
readChar
public int readChar() throws java.io.IOException
Reads the next character.- Specified by:
readChar
in interfaceCharDecoder
- Returns:
- a character or END_OF_STREAM.
- Throws:
java.io.IOException
-
dispose
public void dispose() throws java.io.IOException
Disposes the associated resources.- Specified by:
dispose
in interfaceCharDecoder
- Throws:
java.io.IOException
-
-