JAC project
AOPSYS
CEDRIC & LIP6 labs

org.objectweb.jac.util
Class LineNumberWriter

java.lang.Object
  |
  +--java.io.Writer
        |
        +--java.io.FilterWriter
              |
              +--org.objectweb.jac.util.LineNumberWriter

public class LineNumberWriter
extends FilterWriter

A writer which counts the numbers of lines that it writes.

See Also:
getLines()

Field Summary
 
Fields inherited from class java.io.FilterWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
LineNumberWriter(Writer out)
           
 
Method Summary
 int getLines()
          Returns the number of lines written
 void write(char[] b, int off, int len)
           
 void write(int b)
           
 void write(String str, int off, int len)
           
 
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
 

Constructor Detail

LineNumberWriter

public LineNumberWriter(Writer out)
Method Detail

write

public void write(int b)
           throws IOException
Overrides:
write in class FilterWriter
IOException

write

public void write(char[] b,
                  int off,
                  int len)
           throws IOException
Overrides:
write in class FilterWriter
IOException

write

public void write(String str,
                  int off,
                  int len)
           throws IOException
Overrides:
write in class FilterWriter
IOException

getLines

public int getLines()
Returns the number of lines written


Contact JAC development team:
Renaud Pawlak
Lionel Seinturier
Laurent Martelli