Package loci.common

Class RandomAccessOutputStream

java.lang.Object
java.io.OutputStream
loci.common.RandomAccessOutputStream
All Implemented Interfaces:
Closeable, DataOutput, Flushable, AutoCloseable

public class RandomAccessOutputStream extends OutputStream implements DataOutput, Closeable
RandomAccessOutputStream provides methods for writing to files and byte arrays.
  • Constructor Details

    • RandomAccessOutputStream

      public RandomAccessOutputStream(String file) throws IOException
      Constructs a random access stream around the given file.
      Parameters:
      file - Filename to open the stream for.
      Throws:
      IOException - If there is a problem opening the file.
    • RandomAccessOutputStream

      public RandomAccessOutputStream(IRandomAccess handle)
      Constructs a random access stream around the given handle.
      Parameters:
      handle - Handle to open the stream for.
    • RandomAccessOutputStream

      public RandomAccessOutputStream(byte[] array) throws IOException
      Constructs a random access stream around the given byte array.
      Parameters:
      array - the byte array to be written to
      Throws:
      IOException - if the array cannot be wrapped in a ByteArrayHandle
  • Method Details