org.apache.batik.util.io
Class StringDecoder

java.lang.Object
  extended by org.apache.batik.util.io.StringDecoder
All Implemented Interfaces:
CharDecoder

public class StringDecoder
extends Object
implements CharDecoder

This class reads a string.


Field Summary
protected  int length
          The number of chars in the string.
protected  int next
          The next char index.
protected  String string
          The string which contains the decoded characters.
 
Fields inherited from interface org.apache.batik.util.io.CharDecoder
END_OF_STREAM
 
Constructor Summary
StringDecoder(String s)
          Creates a new StringDecoder.
 
Method Summary
 void dispose()
          Disposes the associated resources.
 int readChar()
          Reads the next character.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

string

protected String string
The string which contains the decoded characters.


length

protected int length
The number of chars in the string.


next

protected int next
The next char index.

Constructor Detail

StringDecoder

public StringDecoder(String s)
Creates a new StringDecoder.

Method Detail

readChar

public int readChar()
             throws IOException
Reads the next character.

Specified by:
readChar in interface CharDecoder
Returns:
a character or END_OF_STREAM.
Throws:
IOException

dispose

public void dispose()
             throws IOException
Disposes the associated resources.

Specified by:
dispose in interface CharDecoder
Throws:
IOException


Copyright © 2008 Apache Software Foundation. All Rights Reserved.