Package org.apfloat.internal
Class DiskDataStorage.FileStorage
- java.lang.Object
-
- org.apfloat.internal.DiskDataStorage.FileStorage
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- DiskDataStorage
private static class DiskDataStorage.FileStorage extends java.lang.Object implements java.io.Serializable
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.Filefileprivate java.nio.channels.FileChannelfileChannelprivate java.lang.Stringfilenameprivate java.io.RandomAccessFilerandomAccessFileprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description FileStorage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.FilegetFile()java.nio.channels.FileChannelgetFileChannel()java.io.RandomAccessFilegetRandomAccessFile()private voidinit()private voidreadObject(java.io.ObjectInputStream in)voidsetSize(long size)voidtransferFrom(java.nio.channels.ReadableByteChannel in, long position, long size)voidtransferTo(java.nio.channels.WritableByteChannel out, long position, long size)private voidwriteObject(java.io.ObjectOutputStream out)
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
filename
private transient java.lang.String filename
-
file
private transient java.io.File file
-
randomAccessFile
private transient java.io.RandomAccessFile randomAccessFile
-
fileChannel
private transient java.nio.channels.FileChannel fileChannel
-
-
Constructor Detail
-
FileStorage
public FileStorage() throws ApfloatRuntimeException- Throws:
ApfloatRuntimeException
-
-
Method Detail
-
init
private void init() throws ApfloatRuntimeException- Throws:
ApfloatRuntimeException
-
setSize
public void setSize(long size) throws java.io.IOException, ApfloatRuntimeException- Throws:
java.io.IOExceptionApfloatRuntimeException
-
transferFrom
public void transferFrom(java.nio.channels.ReadableByteChannel in, long position, long size) throws ApfloatRuntimeException- Throws:
ApfloatRuntimeException
-
transferTo
public void transferTo(java.nio.channels.WritableByteChannel out, long position, long size) throws ApfloatRuntimeException- Throws:
ApfloatRuntimeException
-
getFile
public java.io.File getFile()
-
getRandomAccessFile
public java.io.RandomAccessFile getRandomAccessFile()
-
getFileChannel
public java.nio.channels.FileChannel getFileChannel()
-
writeObject
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException- Throws:
java.io.IOException
-
readObject
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
-