@NotStorableClass public abstract class AbstractRandomAccessFile extends Object implements IRandomAccessFile
| Modifier and Type | Field and Description |
|---|---|
protected static HelperFileUtil |
HELPER_FILE_UTIL |
protected JoafipLogger |
logger |
protected boolean |
opened
true if file opened
|
| Constructor and Description |
|---|
AbstractRandomAccessFile() |
| Modifier and Type | Method and Description |
|---|---|
protected int |
bitsForValue(int value) |
void |
close()
close the file
|
protected abstract void |
closeImpl() |
long |
currentPositionInFile() |
protected abstract long |
currentPositionInFileImpl() |
void |
deleteIfExists()
delete file if exist
|
protected abstract void |
deleteIfExistsImpl() |
void |
deleteIfExistsRenaming() |
protected abstract void |
deleteIfExistsRenamingImpl() |
void |
flush()
flush all modification on disk
|
protected abstract void |
flushImpl() |
boolean |
isClose() |
boolean |
isOpen() |
long |
length() |
protected abstract long |
lengthImpl() |
void |
open()
open the file
|
protected abstract void |
openImpl() |
int |
read(byte[] data) |
int |
read(byte[] data,
int offset,
int length) |
protected abstract int |
readImpl(byte[] data) |
protected abstract int |
readImpl(byte[] data,
int offset,
int length) |
void |
seek(long positionInFile) |
protected abstract void |
seekImpl(long positionInFile) |
void |
setLength(long newSize) |
protected abstract void |
setLengthImpl(long newSize) |
void |
write(byte[] data) |
void |
write(byte[] data,
int length) |
void |
write(byte[] data,
int offset,
int length) |
protected abstract void |
writeImpl(byte[] data) |
protected abstract void |
writeImpl(byte[] data,
int length) |
protected abstract void |
writeImpl(byte[] data,
int offset,
int length) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcopy, differs, getFileprotected final transient JoafipLogger logger
protected static final HelperFileUtil HELPER_FILE_UTIL
protected boolean opened
public void open()
throws FileIOException
IRandomAccessFileopen in interface IRandomAccessFileFileIOExceptionprotected abstract void openImpl()
throws FileIOException
FileIOExceptionpublic void close()
throws FileIOException
IRandomAccessFileclose in interface IRandomAccessFileFileIOExceptionprotected abstract void closeImpl()
throws FileIOException
FileIOExceptionpublic boolean isClose()
isClose in interface IRandomAccessFilepublic boolean isOpen()
isOpen in interface IRandomAccessFilepublic void flush()
throws FileIOException
IRandomAccessFileflush in interface IRandomAccessFileFileIOExceptionprotected abstract void flushImpl()
throws FileIOException
FileIOExceptionpublic void seek(long positionInFile)
throws FileIOException
seek in interface IRandomAccessFileFileIOExceptionprotected abstract void seekImpl(long positionInFile)
throws FileIOException
FileIOExceptionpublic long currentPositionInFile()
throws FileIOException
currentPositionInFile in interface IRandomAccessFileFileIOExceptionprotected abstract long currentPositionInFileImpl()
throws FileIOException
FileIOExceptionpublic int read(byte[] data)
throws FileIOException
read in interface IRandomAccessFileFileIOExceptionprotected abstract int readImpl(byte[] data)
throws FileIOException
FileIOExceptionpublic int read(byte[] data,
int offset,
int length)
throws FileIOException
read in interface IRandomAccessFileFileIOExceptionprotected abstract int readImpl(byte[] data,
int offset,
int length)
throws FileIOException
FileIOExceptionpublic void write(byte[] data)
throws FileIOException
write in interface IRandomAccessFileFileIOExceptionprotected abstract void writeImpl(byte[] data)
throws FileIOException
FileIOExceptionpublic void write(byte[] data,
int length)
throws FileIOException
write in interface IRandomAccessFileFileIOExceptionprotected abstract void writeImpl(byte[] data,
int length)
throws FileIOException
FileIOExceptionpublic void write(byte[] data,
int offset,
int length)
throws FileIOException
write in interface IRandomAccessFileFileIOExceptionprotected abstract void writeImpl(byte[] data,
int offset,
int length)
throws FileIOException
FileIOExceptionpublic long length()
throws FileIOException
length in interface IRandomAccessFileFileIOExceptionprotected abstract long lengthImpl()
throws FileIOException
FileIOExceptionpublic void setLength(long newSize)
throws FileIOException
setLength in interface IRandomAccessFileFileIOExceptionprotected abstract void setLengthImpl(long newSize)
throws FileIOException
FileIOExceptionpublic void deleteIfExists()
throws FileIOException
IRandomAccessFiledeleteIfExists in interface IRandomAccessFileFileIOExceptionprotected abstract void deleteIfExistsImpl()
throws FileIOException
FileIOExceptionpublic void deleteIfExistsRenaming()
throws FileIOException
deleteIfExistsRenaming in interface IRandomAccessFileFileIOExceptionprotected abstract void deleteIfExistsRenamingImpl()
throws FileIOException
FileIOExceptionprotected int bitsForValue(int value)
throws FileIOException
FileIOExceptionCopyright © 2007-2012 Luc Peuvrier. All Rights Reserved.