public class CountingOutputstream extends OutputStream
OutputStream
and delegates
the write calls.getCount()
.Constructor and Description |
---|
CountingOutputstream(OutputStream outputStream)
Creates an instance which will delegate the write calls to the given
output stream.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
long |
getCount() |
void |
write(byte[] bytes) |
void |
write(byte[] bytes,
int off,
int len) |
void |
write(int toWrite) |
public CountingOutputstream(OutputStream outputStream)
outputStream
- stream to wrap.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public long getCount()
public void write(byte[] bytes) throws IOException
write
in class OutputStream
IOException
public void write(byte[] bytes, int off, int len) throws IOException
write
in class OutputStream
IOException
public void write(int toWrite) throws IOException
write
in class OutputStream
IOException
Copyright © 2005–2020 jthink.net. All rights reserved.