Package ghidra.formats.gfilesystem

# Class RefdInputStream

java.lang.Object
java.io.InputStream
ghidra.formats.gfilesystem.RefdInputStream

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`

public class RefdInputStream extends InputStream
An `InputStream` wrapper that keeps a `FileSystemRef` pinned.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RefdInputStream(FileSystemRef fsRef, InputStream delegate)`
  Creates a new `RefdInputStream`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `available()`
  `void`
  `close()`
  `void`
  `mark(int readlimit)`
  `boolean`
  `markSupported()`
  `int`
  `read()`
  `int`
  `read(byte[] b)`
  `int`
  `read(byte[] b, int off, int len)`
  `byte[]`
  `readAllBytes()`
  `int`
  `readNBytes(byte[] b, int off, int len)`
  `byte[]`
  `readNBytes(int len)`
  `void`
  `reset()`
  `long`
  `skip(long n)`
  `void`
  `skipNBytes(long n)`
  `long`
  `transferTo(OutputStream out)`

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

  `nullInputStream`

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

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

- ## Constructor Details

  - ### RefdInputStream

    public RefdInputStream(FileSystemRef fsRef, InputStream delegate)
    Creates a new `RefdInputStream`.
    Parameters:
      `fsRef` - `FileSystemRef`
      `delegate` - the wrapped `InputStream`

- ## Method Details

  - ### close

    public void close() throws IOException
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `Closeable`
    Overrides:
      `close` in class `InputStream`
    Throws:
      `IOException`

  - ### available

    public int available() throws IOException
    Overrides:
      `available` in class `InputStream`
    Throws:
      `IOException`

  - ### read

    public int read() throws IOException
    Specified by:
      `read` in class `InputStream`
    Throws:
      `IOException`

  - ### read

    public int read(byte[] b) throws IOException
    Overrides:
      `read` in class `InputStream`
    Throws:
      `IOException`

  - ### read

    public int read(byte[] b, int off, int len) throws IOException
    Overrides:
      `read` in class `InputStream`
    Throws:
      `IOException`

  - ### readAllBytes

    public byte[] readAllBytes() throws IOException
    Overrides:
      `readAllBytes` in class `InputStream`
    Throws:
      `IOException`

  - ### readNBytes

    public int readNBytes(byte[] b, int off, int len) throws IOException
    Overrides:
      `readNBytes` in class `InputStream`
    Throws:
      `IOException`

  - ### readNBytes

    public byte[] readNBytes(int len) throws IOException
    Overrides:
      `readNBytes` in class `InputStream`
    Throws:
      `IOException`

  - ### mark

    public void mark(int readlimit)
    Overrides:
      `mark` in class `InputStream`

  - ### markSupported

    public boolean markSupported()
    Overrides:
      `markSupported` in class `InputStream`

  - ### skip

    public long skip(long n) throws IOException
    Overrides:
      `skip` in class `InputStream`
    Throws:
      `IOException`

  - ### reset

    public void reset() throws IOException
    Overrides:
      `reset` in class `InputStream`
    Throws:
      `IOException`

  - ### transferTo

    public long transferTo(OutputStream out) throws IOException
    Overrides:
      `transferTo` in class `InputStream`
    Throws:
      `IOException`

  - ### skipNBytes

    public void skipNBytes(long n) throws IOException
    Overrides:
      `skipNBytes` in class `InputStream`
    Throws:
      `IOException`