Package org.apfloat.internal
Class DoubleDiskDataStorage.DoubleDiskArrayAccess
- java.lang.Object
-
- org.apfloat.spi.ArrayAccess
-
- org.apfloat.internal.DoubleMemoryArrayAccess
-
- org.apfloat.internal.DoubleDiskDataStorage.DoubleDiskArrayAccess
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.AutoCloseable
- Enclosing class:
- DoubleDiskDataStorage
private class DoubleDiskDataStorage.DoubleDiskArrayAccess extends DoubleMemoryArrayAccess
-
-
Field Summary
Fields Modifier and Type Field Description private long
fileOffset
private int
mode
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description DoubleDiskArrayAccess(int mode, long fileOffset, int length)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close this array access and commit any changes to the underlying data storage if applicable.-
Methods inherited from class org.apfloat.internal.DoubleMemoryArrayAccess
getData, getDoubleData, subsequence
-
Methods inherited from class org.apfloat.spi.ArrayAccess
getFloatData, getIntData, getLength, getLongData, getOffset
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
mode
private int mode
-
fileOffset
private long fileOffset
-
-
Constructor Detail
-
DoubleDiskArrayAccess
public DoubleDiskArrayAccess(int mode, long fileOffset, int length) throws ApfloatRuntimeException
- Throws:
ApfloatRuntimeException
-
-
Method Detail
-
close
public void close() throws ApfloatRuntimeException
Description copied from class:ArrayAccess
Close this array access and commit any changes to the underlying data storage if applicable.If the
ArrayAccess
was obtained in write mode, the changes are saved to the data storage. Note that even if theArrayAccess
was obtained for reading only, any changes made to the array data may still be committed to the data storage.Note that changes done to a sub-sequence array are not necessarily committed to the underlying data storage when the sub-sequence is closed, but only when the "base"
ArrayAccess
is closed.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Overrides:
close
in classDoubleMemoryArrayAccess
- Throws:
ApfloatRuntimeException
-
-