Class LongDiskDataStorage

  • All Implemented Interfaces:
    Serializable

    public class LongDiskDataStorage
    extends DiskDataStorage
    Disk-based data storage for the long element type.
    Version:
    1.8.0
    Author:
    Mikko Tommila
    See Also:
    Serialized Form
    • Constructor Detail

      • LongDiskDataStorage

        protected LongDiskDataStorage​(LongDiskDataStorage longDiskDataStorage,
                                      long offset,
                                      long length)
        Subsequence constructor.
        Parameters:
        longDiskDataStorage - The originating data storage.
        offset - The subsequence starting position.
        length - The subsequence length.
    • Method Detail

      • implSubsequence

        protected DataStorage implSubsequence​(long offset,
                                              long length)
                                       throws ApfloatRuntimeException
        Description copied from class: DataStorage
        Implementation of getting a subsequence of this data storage. The validity of the arguments of this method do not need to be checked.
        Specified by:
        implSubsequence in class DataStorage
        Parameters:
        offset - The subsequence starting position.
        length - The subsequence length.
        Returns:
        Data storage that represents the specified part of this data storage.
        Throws:
        ApfloatRuntimeException
      • implGetArray

        protected ArrayAccess implGetArray​(int mode,
                                           long offset,
                                           int length)
                                    throws ApfloatRuntimeException
        Description copied from class: DataStorage
        Gets an array access to the data of this data storage when it is treated as a linear block. The validity of the arguments of this method do not need to be checked.
        Specified by:
        implGetArray in class DataStorage
        Parameters:
        mode - Access mode for the array access: DataStorage.READ, DataStorage.WRITE or both.
        offset - Starting position of the array access in the data storage.
        length - Number of accessible elements in the array access.
        Returns:
        The array access.
        Throws:
        ApfloatRuntimeException
      • createArrayAccess

        protected ArrayAccess createArrayAccess​(int mode,
                                                int startColumn,
                                                int columns,
                                                int rows)
        Description copied from class: DiskDataStorage
        Create an empty ArrayAccess.
        Specified by:
        createArrayAccess in class DiskDataStorage
        Parameters:
        mode - Whether the array is prepared for reading, writing or both. The value should be DataStorage.READ, DataStorage.WRITE or a combination of these.
        startColumn - The starting column where data is stored.
        columns - The number of columns of data.
        rows - The number of rows of data.
        Returns:
        Access to an empty array of the specified size and position.
      • createTransposedArrayAccess

        protected ArrayAccess createTransposedArrayAccess​(int mode,
                                                          int startColumn,
                                                          int columns,
                                                          int rows)
        Description copied from class: DiskDataStorage
        Create an empty transposed ArrayAccess.
        Specified by:
        createTransposedArrayAccess in class DiskDataStorage
        Parameters:
        mode - Whether the array is prepared for reading, writing or both. The value should be DataStorage.READ, DataStorage.WRITE or a combination of these.
        startColumn - The starting column where data is stored.
        columns - The number of columns of data.
        rows - The number of rows of data.
        Returns:
        Access to an empty array of the specified size and position.
      • getUnitSize

        protected int getUnitSize()
        Description copied from class: DiskDataStorage
        Size of the element type, in bytes.
        Specified by:
        getUnitSize in class DiskDataStorage
        Returns:
        Size of the element type, in bytes.