Package net.jangaroo.jooc.util
Class PositionTrackingWriter
- java.lang.Object
-
- java.io.Writer
-
- net.jangaroo.jooc.util.PositionTrackingWriter
-
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
public class PositionTrackingWriter extends Writer
A delgating Writer that keeps track of the current line and column of the text being written.
-
-
Constructor Summary
Constructors Constructor Description PositionTrackingWriter(Writer delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()intgetColumn()intgetLine()voidwrite(char[] cbuf, int off, int len)
-
-
-
Constructor Detail
-
PositionTrackingWriter
public PositionTrackingWriter(Writer delegate)
-
-
Method Detail
-
getLine
public int getLine()
-
getColumn
public int getColumn()
-
write
public void write(char[] cbuf, int off, int len) throws IOException- Specified by:
writein classWriter- Throws:
IOException
-
flush
public void flush() throws IOException- Specified by:
flushin interfaceFlushable- Specified by:
flushin classWriter- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classWriter- Throws:
IOException
-
-