de.intarsys.pdf.encoding
Class MappedReader
java.lang.Object
java.io.Reader
de.intarsys.pdf.encoding.MappedReader
- All Implemented Interfaces:
- Closeable, Readable
public class MappedReader
- extends Reader
A reader that uses a PDF style encoding to map byte code to unicode.
Method Summary |
void |
close()
|
Encoding |
getEncoding()
The encoding used by this reader. |
int |
read(char[] cbuf,
int off,
int len)
Read characters into a portion of an array. |
MappedReader
public MappedReader(InputStream is,
Encoding encoding)
- Create a MappedReader
- Parameters:
is
- The underlying byte stream.encoding
- The encoding to use.
getEncoding
public Encoding getEncoding()
- The encoding used by this reader.
- Returns:
- The encoding used by this reader.
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Specified by:
close
in class Reader
- Throws:
IOException
- See Also:
Reader.close()
read
public int read(char[] cbuf,
int off,
int len)
throws IOException
- Read characters into a portion of an array. This method will block until
some input is available, an I/O error occurs, or the end of the stream is
reached.
- Specified by:
read
in class Reader
- Parameters:
cbuf
- Destination bufferoff
- Offset at which to start storing characterslen
- Maximum number of characters to read
- Returns:
- The number of characters read, or -1 if the end of the stream has
been reached
- Throws:
IOException
- If an I/O error occurs
IndexOutOfBoundsException
Copyright © 2006 intarsys consulting GmbH. All Rights Reserved.