Class GroupedRandomAccessSource.SourceEntry

  • Enclosing class:
    GroupedRandomAccessSource

    private static class GroupedRandomAccessSource.SourceEntry
    extends java.lang.Object
    Used to track each source, along with useful meta data
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) long firstByte
      The first byte (in the coordinates of the GroupedRandomAccessSource) that this source contains
      (package private) int index
      The index of this source in the GroupedRandomAccessSource
      (package private) long lastByte
      The last byte (in the coordinates of the GroupedRandomAccessSource) that this source contains
      (package private) RandomAccessSource source
      The underlying source
    • Constructor Summary

      Constructors 
      Constructor Description
      SourceEntry​(int index, RandomAccessSource source, long offset)
      Standard constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long offsetN​(long absoluteOffset)
      Given an absolute offset (in the GroupedRandomAccessSource coordinates), calculate the effective offset in the underlying source
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • firstByte

        final long firstByte
        The first byte (in the coordinates of the GroupedRandomAccessSource) that this source contains
      • lastByte

        final long lastByte
        The last byte (in the coordinates of the GroupedRandomAccessSource) that this source contains
      • index

        final int index
        The index of this source in the GroupedRandomAccessSource
    • Constructor Detail

      • SourceEntry

        public SourceEntry​(int index,
                           RandomAccessSource source,
                           long offset)
        Standard constructor
        Parameters:
        index - the index
        source - the source
        offset - the offset of the source in the GroupedRandomAccessSource
    • Method Detail

      • offsetN

        public long offsetN​(long absoluteOffset)
        Given an absolute offset (in the GroupedRandomAccessSource coordinates), calculate the effective offset in the underlying source
        Parameters:
        absoluteOffset - the offset in the parent GroupedRandomAccessSource
        Returns:
        the effective offset in the underlying source