gov.llnl.babel.backend.writers
Class LineCountingFilterWriter
java.lang.Object
|
+--java.io.Writer
|
+--java.io.FilterWriter
|
+--gov.llnl.babel.backend.writers.LineCountingFilterWriter
- public class LineCountingFilterWriter
- extends java.io.FilterWriter
The LineCountingFilterWriter
keeps track of the current line going through the character
stream. If the write throws an exception, the line count
remains unchanged.
| Fields inherited from class java.io.FilterWriter |
out |
| Fields inherited from class java.io.Writer |
lock |
| Methods inherited from class java.io.FilterWriter |
close, flush |
| Methods inherited from class java.io.Writer |
write, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
d_line_count
protected int d_line_count
LineCountingFilterWriter
public LineCountingFilterWriter(java.io.Writer out)
getLineCount
public int getLineCount()
setLineCount
public void setLineCount(int i)
write
public void write(int c)
throws java.io.IOException
- Overrides:
write in class java.io.FilterWriter
java.io.IOException
write
public void write(char[] cbuf,
int off,
int len)
throws java.io.IOException
- Overrides:
write in class java.io.FilterWriter
java.io.IOException
write
public void write(java.lang.String str,
int off,
int len)
throws java.io.IOException
- Overrides:
write in class java.io.FilterWriter
java.io.IOException
countLines
protected int countLines(char[] x,
int off,
int len)