@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, wait
copy, differs, getFile
protected final transient JoafipLogger logger
protected static final HelperFileUtil HELPER_FILE_UTIL
protected boolean opened
public void open() throws FileIOException
IRandomAccessFile
open
in interface IRandomAccessFile
FileIOException
protected abstract void openImpl() throws FileIOException
FileIOException
public void close() throws FileIOException
IRandomAccessFile
close
in interface IRandomAccessFile
FileIOException
protected abstract void closeImpl() throws FileIOException
FileIOException
public boolean isClose()
isClose
in interface IRandomAccessFile
public boolean isOpen()
isOpen
in interface IRandomAccessFile
public void flush() throws FileIOException
IRandomAccessFile
flush
in interface IRandomAccessFile
FileIOException
protected abstract void flushImpl() throws FileIOException
FileIOException
public void seek(long positionInFile) throws FileIOException
seek
in interface IRandomAccessFile
FileIOException
protected abstract void seekImpl(long positionInFile) throws FileIOException
FileIOException
public long currentPositionInFile() throws FileIOException
currentPositionInFile
in interface IRandomAccessFile
FileIOException
protected abstract long currentPositionInFileImpl() throws FileIOException
FileIOException
public int read(byte[] data) throws FileIOException
read
in interface IRandomAccessFile
FileIOException
protected abstract int readImpl(byte[] data) throws FileIOException
FileIOException
public int read(byte[] data, int offset, int length) throws FileIOException
read
in interface IRandomAccessFile
FileIOException
protected abstract int readImpl(byte[] data, int offset, int length) throws FileIOException
FileIOException
public void write(byte[] data) throws FileIOException
write
in interface IRandomAccessFile
FileIOException
protected abstract void writeImpl(byte[] data) throws FileIOException
FileIOException
public void write(byte[] data, int length) throws FileIOException
write
in interface IRandomAccessFile
FileIOException
protected abstract void writeImpl(byte[] data, int length) throws FileIOException
FileIOException
public void write(byte[] data, int offset, int length) throws FileIOException
write
in interface IRandomAccessFile
FileIOException
protected abstract void writeImpl(byte[] data, int offset, int length) throws FileIOException
FileIOException
public long length() throws FileIOException
length
in interface IRandomAccessFile
FileIOException
protected abstract long lengthImpl() throws FileIOException
FileIOException
public void setLength(long newSize) throws FileIOException
setLength
in interface IRandomAccessFile
FileIOException
protected abstract void setLengthImpl(long newSize) throws FileIOException
FileIOException
public void deleteIfExists() throws FileIOException
IRandomAccessFile
deleteIfExists
in interface IRandomAccessFile
FileIOException
protected abstract void deleteIfExistsImpl() throws FileIOException
FileIOException
public void deleteIfExistsRenaming() throws FileIOException
deleteIfExistsRenaming
in interface IRandomAccessFile
FileIOException
protected abstract void deleteIfExistsRenamingImpl() throws FileIOException
FileIOException
protected int bitsForValue(int value) throws FileIOException
FileIOException
Copyright © 2007-2012 Luc Peuvrier. All Rights Reserved.