org.apache.batik.util.io
Class NormalizingReader
java.lang.Object
|
+--java.io.Reader
|
+--org.apache.batik.util.io.NormalizingReader
- Direct Known Subclasses:
- StreamNormalizingReader, StringNormalizingReader
- public abstract class NormalizingReader
- extends java.io.Reader
This class represents a reader which normalizes the line break: \n,
\r, \r\n are replaced by \n. The methods of this reader are not
synchronized. The input is buffered.
Fields inherited from class java.io.Reader |
lock |
Method Summary |
abstract int |
getColumn()
Returns the current column in the stream. |
abstract int |
getLine()
Returns the current line in the stream. |
int |
read(char[] cbuf,
int off,
int len)
Read characters into a portion of an array. |
Methods inherited from class java.io.Reader |
close, mark, markSupported, read, read, ready, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NormalizingReader
public NormalizingReader()
read
public int read(char[] cbuf,
int off,
int len)
throws java.io.IOException
- Read characters into a portion of an array.
- Overrides:
read
in class java.io.Reader
- Parameters:
cbuf
- Destination bufferoff
- Offset at which to start writing characterslen
- Maximum number of characters to read- Returns:
- The number of characters read, or -1 if the end of the
stream has been reached
getLine
public abstract int getLine()
- Returns the current line in the stream.
getColumn
public abstract int getColumn()
- Returns the current column in the stream.
Copyright © 2002 Apache Software Foundation. All Rights Reserved.