Package org.apache.batik.util.io
Class GenericDecoder
- java.lang.Object
-
- org.apache.batik.util.io.GenericDecoder
-
- All Implemented Interfaces:
CharDecoder
public class GenericDecoder extends java.lang.Object implements CharDecoder
This class delegates to a reader the decoding of an input stream.- Version:
- $Id: GenericDecoder.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Field Summary
Fields Modifier and Type Field Description protected java.io.ReaderreaderThe reader used to decode the stream.-
Fields inherited from interface org.apache.batik.util.io.CharDecoder
END_OF_STREAM
-
-
Constructor Summary
Constructors Constructor Description GenericDecoder(java.io.InputStream is, java.lang.String enc)Creates a new GenericDecoder.GenericDecoder(java.io.Reader r)Creates a new GenericDecoder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()Disposes the associated resources.intreadChar()Reads the next character.
-
-
-
Constructor Detail
-
GenericDecoder
public GenericDecoder(java.io.InputStream is, java.lang.String enc) throws java.io.IOExceptionCreates a new GenericDecoder.- Parameters:
is- The input stream to decode.enc- The Java encoding name.- Throws:
java.io.IOException
-
GenericDecoder
public GenericDecoder(java.io.Reader r)
Creates a new GenericDecoder.- Parameters:
r- The reader to use.
-
-
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
-
-