org.apache.cassandra.io.util

## Class MemoryInputStream

- java.lang.Object
- - java.io.InputStream
  - - org.apache.cassandra.io.util.RebufferingInputStream
    - - org.apache.cassandra.io.util.MemoryInputStream

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

      public class MemoryInputStream
      extends RebufferingInputStream
      implements java.io.DataInput

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.cassandra.io.util.DataInputPlus

      `DataInputPlus.DataInputStreamPlus`

  - ### Field Summary

    - ### Fields inherited from class org.apache.cassandra.io.util.RebufferingInputStream

      `buffer`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MemoryInputStream(Memory mem)`
    `MemoryInputStream(Memory mem, int bufferSize)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `available()`
    `protected void` | `reBuffer()` Implementations must implement this method to refill the buffer.

    - ### Methods inherited from class org.apache.cassandra.io.util.RebufferingInputStream

      `read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readPrimitiveSlowly, readShort, readUnsignedByte, readUnsignedShort, readUnsignedVInt, readUTF, readVInt, skipBytes`

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

      `close, mark, markSupported, read, reset, skip`

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

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

    - ### Methods inherited from interface java.io.DataInput

      `readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes`

    - ### Methods inherited from interface org.apache.cassandra.io.util.DataInputPlus

      `skipBytesFully`

    - ### Methods inherited from interface java.io.Closeable

      `close`

- - ### Constructor Detail

    - #### MemoryInputStream

          public MemoryInputStream(Memory mem)

    - #### MemoryInputStream

          public MemoryInputStream(Memory mem,
                                   int bufferSize)

  - ### Method Detail

    - #### reBuffer

          protected void reBuffer()
                           throws java.io.IOException

      Description copied from class: `RebufferingInputStream`
      Implementations must implement this method to refill the buffer. They can expect the buffer to be empty when this method is invoked.
      Specified by:
        `reBuffer` in class `RebufferingInputStream`
      Throws:
        `java.io.IOException`

    - #### available

          public int available()

      Overrides:
        `available` in class `java.io.InputStream`

Copyright © 2018 The Apache Software Foundation