loci.formats.cache

## Class ByteArraySource

- java.lang.Object
- - loci.formats.cache.CacheSource
  - - loci.formats.cache.ByteArraySource

- All Implemented Interfaces:
    ICacheSource

      public class ByteArraySource
      extends CacheSource

  Retrieves byte arrays from a data source (e.g., a file) using Bio-Formats.

- - ### Field Summary

    - ### Fields inherited from class loci.formats.cache.CacheSource

      `reader`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ByteArraySource(IFormatReader r)` Constructs a byte array source from the given Bio-Formats reader.
    `ByteArraySource(java.lang.String id)` Constructs a byte array source that draws from the given file.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `getObject(int index)` Get the object corresponding to the given index.

    - ### Methods inherited from class loci.formats.cache.CacheSource

      `getObjectCount`

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

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

- - ### Constructor Detail

    - #### ByteArraySource

          public ByteArraySource(IFormatReader r)

      Constructs a byte array source from the given Bio-Formats reader.

    - #### ByteArraySource

          public ByteArraySource(java.lang.String id)
                          throws CacheException

      Constructs a byte array source that draws from the given file.
      Throws:
        `CacheException`

  - ### Method Detail

    - #### getObject

          public java.lang.Object getObject(int index)
                                     throws CacheException

      Description copied from interface: `ICacheSource`
      Get the object corresponding to the given index.
      Specified by:
        `getObject` in interface `ICacheSource`
      Specified by:
        `getObject` in class `CacheSource`
      Throws:
        `CacheException`

Copyright © 2026 Open Microscopy Environment