public class

CountingOutputStream

extends FilterOutputStream
java.lang.Object
   ↳ java.io.OutputStream
     ↳ java.io.FilterOutputStream
       ↳ com.facebook.common.internal.CountingOutputStream

Class Overview

An OutputStream that counts the number of bytes written.

Summary

[Expand]
Inherited Fields
From class java.io.FilterOutputStream
Public Constructors
CountingOutputStream(OutputStream out)
Constructs a new FilterOutputStream with out as its target stream.
Public Methods
void close()
long getCount()
Returns the number of bytes written.
void write(byte[] b, int off, int len)
void write(int b)
[Expand]
Inherited Methods
From class java.io.FilterOutputStream
From class java.io.OutputStream
From class java.lang.Object
From interface java.io.Closeable
From interface java.io.Flushable
From interface java.lang.AutoCloseable

Public Constructors

public CountingOutputStream (OutputStream out)

Constructs a new FilterOutputStream with out as its target stream.

Parameters
out the target stream that this stream writes to.

Public Methods

public void close ()

Throws
IOException

public long getCount ()

Returns the number of bytes written.

public void write (byte[] b, int off, int len)

Throws
IOException

public void write (int b)

Throws
IOException