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.File
file
private java.nio.channels.FileChannel
fileChannel
private java.lang.String
filename
private java.io.RandomAccessFile
randomAccessFile
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description FileStorage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.File
getFile()
java.nio.channels.FileChannel
getFileChannel()
java.io.RandomAccessFile
getRandomAccessFile()
private void
init()
private void
readObject(java.io.ObjectInputStream in)
void
setSize(long size)
void
transferFrom(java.nio.channels.ReadableByteChannel in, long position, long size)
void
transferTo(java.nio.channels.WritableByteChannel out, long position, long size)
private void
writeObject(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.IOException
ApfloatRuntimeException
-
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.IOException
java.lang.ClassNotFoundException
-
-