public class CountingOutputWriter
extends java.io.FilterWriter
| Constructor and Description | 
|---|
| CountingOutputWriter(java.io.Writer writer)Create the CountingOutputWriter for the specified writer | 
| Modifier and Type | Method and Description | 
|---|---|
| long | getCount()Return the number of characters written | 
| void | write(char[] cbuf,
     int off,
     int len)Write an array of characters starting at the specified offset | 
| void | write(int c)Write a single character | 
| void | write(java.lang.String s,
     int off,
     int len)Write a substring | 
public CountingOutputWriter(java.io.Writer writer)
writer - Output writerpublic void write(int c)
           throws java.io.IOException
write in class java.io.FilterWriterc - Character to be writtenjava.io.IOException - I/O error occurredpublic void write(char[] cbuf,
                  int off,
                  int len)
           throws java.io.IOException
write in class java.io.FilterWritercbuf - Characters to be writtenoff - Starting offsetlen - Number of characters to writejava.io.IOException - I/O error occurredpublic void write(java.lang.String s,
                  int off,
                  int len)
           throws java.io.IOException
write in class java.io.FilterWriters - String to be writtenoff - Starting offsetlen - Number of characters to writejava.io.IOException - I/O error occurredpublic long getCount()