public interface IFileForStorable
Modifier and Type | Method and Description |
---|---|
void |
close()
close heap file access operation
|
void |
copy(FileForStorable fileForStorable)
copy this file to an other file
|
void |
copy(String fileName)
copy this file to an other file
|
void |
deleteFileIfExists()
delete file if exists
|
void |
deleteFileIfExistsRenaming()
delete file if exists
|
void |
flush()
flush modification to disk
|
int |
getCachePageSize() |
File |
getFile() |
long |
getFileSize()
Returns the size of this file.
|
boolean |
isUseCache() |
void |
open()
open heap file for access operation
|
int |
read(byte[] data)
delegate to
RandomAccessFile.read(byte[]) closing the file in
case of I/O errorReads up to data.length bytes of data from this file into an
array of bytes. |
int |
read(byte[] data,
int offset,
int length) |
void |
resetFileSize() |
void |
seek(long positionInFile)
delegate to
RandomAccessFile.seek(long) closing the file in case
of I/O error |
void |
write(byte[] data)
delegate to
RandomAccessFile#write(byte[])) closing the file in
case of I/O error |
void |
write(byte[] data,
int offset,
int length) |
void |
write(ToBackupRecord toBackupRecord) |
long getFileSize() throws HeapException
HeapException
- if an I/O error occurs.File getFile()
void deleteFileIfExists() throws HeapException
HeapException
void deleteFileIfExistsRenaming() throws HeapException
HeapException
void open() throws HeapException
HeapException
- if an I/O error occurs while opening filevoid flush() throws HeapException
HeapException
void resetFileSize() throws HeapException
HeapException
void close() throws HeapException
HeapException
- if an I/O error occurs while closing the the fileFileForStorableRuntimeException
- file already closedvoid seek(long positionInFile) throws HeapException
RandomAccessFile.seek(long)
closing the file in case
of I/O errorpositionInFile
- HeapException
- if an I/O error occursHeapRuntimeException
- file closedint read(byte[] data) throws HeapException
RandomAccessFile.read(byte[])
closing the file in
case of I/O errordata.length
bytes of data from this file into an
array of bytes.data
- where store data readHeapException
- if an I/O error occursHeapRuntimeException
- file closedint read(byte[] data, int offset, int length) throws HeapException
HeapException
void write(byte[] data) throws HeapException
RandomAccessFile#write(byte[]))
closing the file in
case of I/O errordata
- HeapException
- if an I/O error occursHeapRuntimeException
- file closedvoid write(byte[] data, int offset, int length) throws HeapException
HeapException
void write(ToBackupRecord toBackupRecord) throws HeapException
HeapException
void copy(FileForStorable fileForStorable) throws HeapException
fileForStorable
- HeapException
void copy(String fileName) throws FileIOException
fileName
- FileIOException
boolean isUseCache()
int getCachePageSize()
Copyright © 2007-2012 Luc Peuvrier. All Rights Reserved.