org.apache.batik.util.io

Class StringDecoder

public class StringDecoder extends Object implements CharDecoder

This class reads a string.
Field Summary
protected intlength
The number of chars in the string.
protected intnext
The next char index.
protected Stringstring
The string which contains the decoded characters.
Constructor Summary
StringDecoder(String s)
Creates a new StringDecoder.
Method Summary
voiddispose()
Disposes the associated resources.
intreadChar()
Reads the next character.

Field Detail

length

protected int length
The number of chars in the string.

protected int next
The next char index.

string

protected String string
The string which contains the decoded characters.

Constructor Detail

StringDecoder

public StringDecoder(String s)
Creates a new StringDecoder.

Method Detail

dispose

public void dispose()
Disposes the associated resources.

readChar

public int readChar()
Reads the next character.

Returns: a character or END_OF_STREAM.

Copyright B) 2008 Apache Software Foundation. All Rights Reserved.