MemoryOutputStream (apache-cassandra API)
Date: 2014-10-21

org.apache.cassandra.io.util

## Class MemoryOutputStream

- java.lang.Object
- - java.io.OutputStream
  - - org.apache.cassandra.io.util.MemoryOutputStream

- All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable

      public class MemoryOutputStream
      extends java.io.OutputStream

  This class provides a way to stream the writes into the `Memory`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MemoryOutputStream(Memory mem)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `position()`
    `void` | `write(byte[] b, int off, int len)`
    `void` | `write(int b)`

    - ### Methods inherited from class java.io.OutputStream

      `close, flush, write`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MemoryOutputStream

          public MemoryOutputStream(Memory mem)

  - ### Method Detail

    - #### write

          public void write(int b)

      Specified by:
        `write` in class `java.io.OutputStream`

    - #### write

          public void write(byte[] b,
                   int off,
                   int len)
                     throws java.io.IOException

      Overrides:
        `write` in class `java.io.OutputStream`
      Throws:
        `java.io.IOException`

    - #### position

          public int position()

Copyright © 2014 The Apache Software Foundation