|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--java.io.File
|
+--com.legacyj.isam.ISAMFile
ISAMFile represents a complete ISAM file (data+keys+lock).
ISAMFile extends File and reimplements many of the File methods to be meaningful in an ISAM context. It also provides many of the ISAM functions in a form which do not require an explicit file descriptor, but rather are handled by the object itself.
ISAMJ Copyright 2000-2001 LegacyJ Corp. All Rights Reserved.
| Fields inherited from class java.io.File |
pathSeparator, pathSeparatorChar, separator, separatorChar |
| Constructor Summary |
ISAMFile(java.io.File dir,
java.lang.String name) Constructor |
ISAMFile(java.io.File dir,
java.lang.String name, int recordLength) Constructor |
ISAMFile(java.lang.String path)
Constructor |
ISAMFile(java.lang.String path,
int recordLength) Constructor |
ISAMFile(java.lang.String path,
java.lang.String name) Constructor |
ISAMFile(java.lang.String path,
java.lang.String name, int recordLength) Constructor |
| Method Summary | |
void |
addIndex(ISAMKey key) Add a key to the index structure (isaddindex). |
void |
build(int recordLength,
ISAMKey key, int mode) Build the ISAM file. |
void |
build(ISAMKey key, int mode) Build the ISAM file. |
void |
close() Close the ISAM file. |
boolean |
createNewFile() NOT IMPLEMENTED |
void |
delcurr() Delete current. |
boolean |
delete() Deletes the file specified by this object. |
void |
delete(ISAMRecord record) Delete given record. |
void |
delindex(ISAMKey key) Delete the index associated with key. |
void |
delrec(long recnum) Delete the record recnum |
boolean |
equals(java.lang.Object obj)
Does this fully equal obj? |
boolean |
exists() Does any of this ISAMFile's parts exist? |
java.io.File |
getDataFile() |
int |
getErrorNumber() |
java.io.File |
getKeyFile() |
java.io.File |
getLockFile() |
static int |
getMajorVersion() Major version number |
static int |
getMinorVersion() Minor version number |
void |
indexinfo(ISAMDictInfo dest, int idx) Get index info into dest. |
void |
lock() Lock ISAM file. |
void |
open(int mode) Open ISAM file using mode. |
void |
read(ISAMRecord record, int mode) Read ISAM file into record using mode. |
void |
release() Release |
boolean |
renameTo(java.io.File dest)
Rename this ISAM file to another File; File must be an instance of ISAMFile. |
boolean |
renameTo(ISAMFile dest) Rename this ISAM file to another ISAMFile |
void |
rewriteCurrent(ISAMRecord record) Rewrite Current |
void |
start(ISAMKey key, int len, ISAMRecord record,
int mode) Start at given key set. |
void |
unlock() Unlock ISAM file. |
void |
write(ISAMRecord record) Write record. |
void |
writeCurrent(ISAMRecord record) Write record using current. |
| Methods inherited from class java.io.File |
canRead, canWrite, compareTo, compareTo, createTempFile, createTempFile,
deleteOnExit, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath,
getName, getParent, getParentFile, getPath, hashCode, isAbsolute, isDirectory, isFile,
isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots,
mkdir, mkdirs, setLastModified, setReadOnly, toString, toURL |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ISAMFile(java.io.File dir,
java.lang.String name)
dir - directoryname - filename within directory (aside from extension)public ISAMFile(java.lang.String path)
path - String representing complete ISAM filename (aside from extension)
public ISAMFile(java.lang.String path,
java.lang.String name)
path - directoryname - filename (aside from extension)
public ISAMFile(java.io.File dir,
java.lang.String name,
int recordLength)
dir - directoryname - filename (aside from extension)recordLength - default record length for file
public ISAMFile(java.lang.String path,
int recordLength)
path - String representing complete ISAM filename (aside from extension)recordLength - default record length for file
public ISAMFile(java.lang.String path,
java.lang.String name,
int recordLength)
path - directoryname - filename (aside from extension)recordLength - default record length for file| Method Detail |
public static final int getMajorVersion()
public static final int getMinorVersion()
public boolean exists()
exists in class java.io.Filepublic boolean renameTo(java.io.File dest)
renameTo in class java.io.Filedest - file designation to rename file tojava.lang.SecurityException - if cannot write to both old and new pathpublic boolean renameTo(ISAMFile dest)
dest - file designation to rename file tojava.lang.SecurityException - if cannot write to both old and new pathpublic boolean delete()
delete in class java.io.Filejava.lang.SecurityException - if a security manager exists, its checkDelete
method is called with the pathname of this File to see if the application is allowed to
delete the file.public boolean equals(java.lang.Object obj)
equals in class java.io.Fileobj - The object to compare against.
public boolean createNewFile()
throws java.io.IOException
createNewFile in class java.io.Filejava.io.IOException - public java.io.File getKeyFile()
public java.io.File getLockFile()
public java.io.File getDataFile()
public int getErrorNumber()
public void addIndex(ISAMKey key)
throws java.io.IOException
key - ISAM Keyjava.io.IOException - if file not open
public void build(ISAMKey key,
int mode)
throws java.io.IOException
key - ISAM Keymode - Mode to build.java.io.IOException - if file not closed
public void build(int recordLength,
ISAMKey key,
int mode)
throws java.io.IOException
recordLength - of ISAM file.key - The ISAMKey.mode - java.io.IOException - if file not closed
public void close()
throws java.io.IOException
java.io.IOException - if file not open
public void delcurr()
throws java.io.IOException
java.io.IOException - if file not open
public void delete(ISAMRecord record)
throws java.io.IOException
record - ISAMRecord.java.io.IOException - if file not open
public void delindex(ISAMKey key)
throws java.io.IOException
key - ISAMKey.java.io.IOException - if file not open
public void delrec(long recnum)
throws java.io.IOException
recnum - Record number.java.io.IOException - if file not open
public void indexinfo(ISAMDictInfo dest,
int idx)
throws java.io.IOException
dest - ISAMDictInfoidx - Index number.java.io.IOException - if file not open
public void lock()
throws java.io.IOException
java.io.IOException - if file not open
public void open(int mode)
throws java.io.IOException
mode - java.io.IOException - if file not closed
public void read(ISAMRecord record,
int mode)
throws java.io.IOException
record - ISAMRecordmode - java.io.IOException - if file not open
public void release()
throws java.io.IOException
java.io.IOException - if file not open
public void rewriteCurrent(ISAMRecord record)
throws java.io.IOException
record - Record to rewrite.java.io.IOException - if file not open
public void start(ISAMKey key,
int len,
ISAMRecord record,
int mode)
throws java.io.IOException
key - ISAMKeylen - Lengthrecord - ISAMRecordmode - java.io.IOException - if file not open
public void unlock()
throws java.io.IOException
java.io.IOException - if file not open
public void writeCurrent(ISAMRecord record)
throws java.io.IOException
record - ISAMRecordjava.io.IOException - if file not open
public void write(ISAMRecord record)
throws java.io.IOException
record - ISAMRecordjava.io.IOException - if file not open
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
©Copyright LegacyJ Corporation 2001