public class SqlJetFile extends java.lang.Object implements ISqlJetFile
| Modifier and Type | Field and Description |
|---|---|
static int |
SQLJET_DEFAULT_SECTOR_SIZE |
PENDING_BYTE, RESERVED_BYTE, SHARED_FIRST, SHARED_SIZE| Modifier and Type | Method and Description |
|---|---|
boolean |
checkReservedLock()
This routine checks if there is a RESERVED lock held on the specified
file by this or any other process.
|
void |
close()
Close a file.
|
java.util.Set<SqlJetDeviceCharacteristics> |
deviceCharacteristics()
Return the device characteristics for the file.
|
long |
fileSize()
Determine the current size of a file in bytes
|
SqlJetFileType |
getFileType()
Returns file type.
|
SqlJetLockType |
getLockType()
Returns lock type of file.
|
java.util.Set<SqlJetFileOpenPermission> |
getPermissions()
Returns assiciated permissions.
|
boolean |
isMemJournal()
Return true if the file-handle passed as an argument is
an in-memory journal
|
boolean |
lock(SqlJetLockType lockType)
Lock the file with the lock specified by parameter locktype - one
of the following:
(1) SHARED
(2) RESERVED
(3) PENDING
(4) EXCLUSIVE
Sometimes when requesting one lock state, additional lock states
are inserted in between.
|
int |
read(ISqlJetMemoryPointer buffer,
int amount,
long offset)
Read data from a file into a buffer.
|
int |
sectorSize()
Return the sector size in bytes of the underlying block device for
the specified file.
|
void |
sync(java.util.Set<SqlJetSyncFlags> syncFlags)
Make sure all writes to a particular file are committed to disk.
|
void |
truncate(long size)
Truncate an open file to a specified size
|
boolean |
unlock(SqlJetLockType lockType)
Lower the locking level on file descriptor pFile to locktype.
|
void |
write(ISqlJetMemoryPointer buffer,
int amount,
long offset)
Write data from a buffer into a file.
|
public static final int SQLJET_DEFAULT_SECTOR_SIZE
public SqlJetFileType getFileType()
ISqlJetFilegetFileType in interface ISqlJetFileSqlJetFileTypepublic java.util.Set<SqlJetFileOpenPermission> getPermissions()
ISqlJetFilegetPermissions in interface ISqlJetFileSqlJetFileOpenPermissionpublic void close()
throws SqlJetException
ISqlJetFileclose in interface ISqlJetFileSqlJetExceptionpublic int read(ISqlJetMemoryPointer buffer, int amount, long offset) throws SqlJetIOException
ISqlJetFileread in interface ISqlJetFileSqlJetIOExceptionpublic void write(ISqlJetMemoryPointer buffer, int amount, long offset) throws SqlJetIOException
ISqlJetFilewrite in interface ISqlJetFileSqlJetIOExceptionpublic void truncate(long size)
throws SqlJetIOException
ISqlJetFiletruncate in interface ISqlJetFileSqlJetIOExceptionpublic void sync(java.util.Set<SqlJetSyncFlags> syncFlags) throws SqlJetIOException
ISqlJetFilesync in interface ISqlJetFileSqlJetIOExceptionpublic long fileSize()
throws SqlJetException
ISqlJetFilefileSize in interface ISqlJetFileSqlJetExceptionpublic SqlJetLockType getLockType()
ISqlJetFilegetLockType in interface ISqlJetFilepublic boolean lock(SqlJetLockType lockType) throws SqlJetIOException
ISqlJetFilelock in interface ISqlJetFileSqlJetIOExceptionpublic boolean unlock(SqlJetLockType lockType) throws SqlJetIOException
ISqlJetFileunlock in interface ISqlJetFileSqlJetIOExceptionpublic boolean checkReservedLock()
ISqlJetFilecheckReservedLock in interface ISqlJetFilepublic int sectorSize()
ISqlJetFilesectorSize in interface ISqlJetFilepublic java.util.Set<SqlJetDeviceCharacteristics> deviceCharacteristics()
ISqlJetFiledeviceCharacteristics in interface ISqlJetFilepublic boolean isMemJournal()
ISqlJetFileisMemJournal in interface ISqlJetFileCopyright © 2009-2010 TMate Software Ltd. All Rights Reserved.