org.maverickdbms.basic
Class SequentialFile

java.lang.Object
  extended byorg.maverickdbms.basic.SequentialFile
All Implemented Interfaces:
Variable

public class SequentialFile
extends java.lang.Object
implements Variable

SequentialFile provides an implementartion of a MV sequential file.


Field Summary
protected  java.io.RandomAccessFile file
           
 
Constructor Summary
SequentialFile()
           
 
Method Summary
 ConstantString CLOSESEQ()
          Close sequential file.
 mvString FILEINFO(mvString result, ConstantString code)
           
 ConstantString OPENSEQ(ConstantString name, boolean readonly)
          Open sequential file.
 ConstantString OPENSEQ(ConstantString dir, ConstantString name, boolean readonly)
          Open sequential file.
 ConstantString READBLK(mvString var, ConstantString blksize)
          Read a set number of bytes from current file position.
 ConstantString READSEQ(mvString var)
          Read record from current file position.
 ConstantString SEEK(ConstantString offset, ConstantString relto)
           
 ConstantString WRITEBLK(mvString var)
           
 ConstantString WRITESEQ(ConstantString var, boolean append)
          Write record at current filepostion.
 ConstantString WRITESEQF(ConstantString var, boolean append)
          Write record and flush.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

file

protected java.io.RandomAccessFile file
Constructor Detail

SequentialFile

public SequentialFile()
Method Detail

CLOSESEQ

public ConstantString CLOSESEQ()
                        throws mvException
Close sequential file.

Throws:
mvException

FILEINFO

public mvString FILEINFO(mvString result,
                         ConstantString code)
                  throws mvException
Throws:
mvException

OPENSEQ

public ConstantString OPENSEQ(ConstantString name,
                              boolean readonly)
                       throws mvException
Open sequential file.

Throws:
mvException

OPENSEQ

public ConstantString OPENSEQ(ConstantString dir,
                              ConstantString name,
                              boolean readonly)
                       throws mvException
Open sequential file.

Throws:
mvException

READBLK

public ConstantString READBLK(mvString var,
                              ConstantString blksize)
Read a set number of bytes from current file position.

Parameters:
var - variable to hold the read data
blksize - length of data to read
Returns:
SUCCESS if successful ELSE if error

READSEQ

public ConstantString READSEQ(mvString var)
Read record from current file position.


SEEK

public ConstantString SEEK(ConstantString offset,
                           ConstantString relto)

WRITEBLK

public ConstantString WRITEBLK(mvString var)

WRITESEQ

public ConstantString WRITESEQ(ConstantString var,
                               boolean append)
                        throws mvException
Write record at current filepostion.

Throws:
mvException

WRITESEQF

public ConstantString WRITESEQF(ConstantString var,
                                boolean append)
                         throws mvException
Write record and flush.

Throws:
mvException