java.io.Closeable
, java.io.Flushable
, java.lang.AutoCloseable
public final class CountOutputStream
extends java.io.OutputStream
OutputStream
that counts the written bytes.Modifier and Type | Method | Description |
---|---|---|
int |
getBytesWritten() |
|
void |
write(byte[] buf) |
Counts the written bytes.
|
void |
write(byte[] buf,
int off,
int len) |
Counts the written bytes.
|
void |
write(int b) |
Counts the written bytes.
|
public void write(byte[] buf, int off, int len) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
OutputStream.write(byte[], int, int)
public void write(byte[] buf) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
OutputStream.write(byte[])
public void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
OutputStream.write(int)
public int getBytesWritten()
Copyright © 1998–2018. All rights reserved.