Back to Fresco

PooledByteBufferOutputStream

docs/javadoc/reference/com/facebook/common/memory/PooledByteBufferOutputStream.html

3.6.013.6 KB
Original Source

Fresco

|

|

Packages | Classes

Interfaces

Classes

Enums

Exceptions

Packages | Classes

Summary: Ctors | Methods | Inherited Methods | [Expand All]

public abstract class

PooledByteBufferOutputStream

extends OutputStream

| java.lang.Object | | ↳ | java.io.OutputStream | | | ↳ | com.facebook.common.memory.PooledByteBufferOutputStream |

| Known Direct Subclasses

MemoryPooledByteBufferOutputStream

| MemoryPooledByteBufferOutputStream | An implementation of PooledByteBufferOutputStream that produces a MemoryPooledByteBuffer |

|

Class Overview

An OutputStream that produces a PooledByteBuffer.

Expected use for such stream is to first write sequence of bytes to the stream and then call toByteBuffer to produce PooledByteBuffer containing written data. After toByteBuffer returns client can continue writing new data and call toByteBuffer over and over again.

Streams implementing this interface are closeable resources and need to be closed in order to release underlying resources. Close is idempotent operation and after stream was closed, no other method should be called. Streams subclassing PooledByteBufferOutputStream are not allowed to throw IOException from close method.

Summary

Public Constructors
Public Methods
void
Closes the stream.
abstract int
Returns the total number of bytes written to this stream so far.
abstract PooledByteBuffer
Creates a PooledByteBuffer from the contents of the stream.

| [Expand] Inherited Methods | | --- | | From class java.io.OutputStream

| void | close() | | void | flush() | | void | write(byte[] arg0) | | void | write(byte[] arg0, int arg1, int arg2) | | abstract void | write(int arg0) |

| | From class java.lang.Object

| Object | clone() | | boolean | equals(Object arg0) | | void | finalize() | | final Class<?> | getClass() | | int | hashCode() | | final void | notify() | | final void | notifyAll() | | String | toString() | | final void | wait(long arg0, int arg1) | | final void | wait(long arg0) | | final void | wait() |

| | From interface java.io.Closeable

| abstract void | close() |

| | From interface java.io.Flushable

| abstract void | flush() |

| | From interface java.lang.AutoCloseable

| abstract void | close() |

|

Public Constructors

public PooledByteBufferOutputStream()

Public Methods

public void close()

Closes the stream.

public abstract int size()

Returns the total number of bytes written to this stream so far.

Returns
  • the number of bytes written to this stream.

public abstract PooledByteBuffer toByteBuffer()

Creates a PooledByteBuffer from the contents of the stream.

+Generated by Doclava. +