org.apache.batik.util.io

Class GenericDecoder

public class GenericDecoder extends Object implements CharDecoder

This class delegates to a reader the decoding of an input stream.
Field Summary
protected Readerreader
The reader used to decode the stream.
Constructor Summary
GenericDecoder(InputStream is, String enc)
Creates a new GenericDecoder.
GenericDecoder(Reader r)
Creates a new GenericDecoder.
Method Summary
voiddispose()
Disposes the associated resources.
intreadChar()
Reads the next character.

Field Detail

reader

protected Reader reader
The reader used to decode the stream.

Constructor Detail

GenericDecoder

public GenericDecoder(InputStream is, String enc)
Creates a new GenericDecoder.

Parameters: is The input stream to decode. enc The Java encoding name.

GenericDecoder

public GenericDecoder(Reader r)
Creates a new GenericDecoder.

Parameters: r The reader to use.

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) 2007 Apache Software Foundation. All Rights Reserved.