com.onewebsql.util.io
Class CountingWriter

java.lang.Object
  extended by java.io.Writer
      extended by java.io.FilterWriter
          extended by com.onewebsql.util.io.output.ProxyWriter
              extended by com.onewebsql.util.io.CountingWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable

public class CountingWriter
extends ProxyWriter

Implementacja pisarza zliczająca zapisane znaki.


Field Summary
protected  long count
          Liczba zapisanych znaków.
 
Fields inherited from class java.io.FilterWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
CountingWriter(Writer proxy)
          Konstruktor.
 
Method Summary
 long getCount()
          Zwraca liczbę zapisanych znaków.
 void write(char[] buf)
          Invokes the delegate's write(char[]) method.
 void write(char[] buffer, int off, int len)
          Invokes the delegate's write(char[], int, int) method.
 void write(int idx)
          Invokes the delegate's write(int) method.
 void write(String str)
          Invokes the delegate's write(String) method.
 void write(String str, int off, int len)
          Invokes the delegate's write(String) method.
 
Methods inherited from class com.onewebsql.util.io.output.ProxyWriter
close, flush
 
Methods inherited from class java.io.Writer
append, append, append
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

count

protected long count
Liczba zapisanych znaków.

Constructor Detail

CountingWriter

public CountingWriter(Writer proxy)
Konstruktor.

Parameters:
proxy - pisarz do którego zapisywane będą znaki.
Method Detail

write

public void write(char[] buffer,
                  int off,
                  int len)
           throws IOException
Description copied from class: ProxyWriter
Invokes the delegate's write(char[], int, int) method.

Overrides:
write in class ProxyWriter
Parameters:
buffer - the characters to write
off - The start offset
len - The number of characters to write
Throws:
IOException - if an I/O error occurs

write

public void write(char[] buf)
           throws IOException
Description copied from class: ProxyWriter
Invokes the delegate's write(char[]) method.

Overrides:
write in class ProxyWriter
Parameters:
buf - the characters to write
Throws:
IOException - if an I/O error occurs

write

public void write(int idx)
           throws IOException
Description copied from class: ProxyWriter
Invokes the delegate's write(int) method.

Overrides:
write in class ProxyWriter
Parameters:
idx - the character to write
Throws:
IOException - if an I/O error occurs

write

public void write(String str,
                  int off,
                  int len)
           throws IOException
Description copied from class: ProxyWriter
Invokes the delegate's write(String) method.

Overrides:
write in class ProxyWriter
Parameters:
str - the string to write
off - The start offset
len - The number of characters to write
Throws:
IOException - if an I/O error occurs

write

public void write(String str)
           throws IOException
Description copied from class: ProxyWriter
Invokes the delegate's write(String) method.

Overrides:
write in class ProxyWriter
Parameters:
str - the string to write
Throws:
IOException - if an I/O error occurs

getCount

public long getCount()
Zwraca liczbę zapisanych znaków.

Returns:
liczbę zapisanych znaków.


Copyright © 2011-2013 e-point SA. All Rights Reserved.