|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.as400.access.AS400File | +--com.ibm.as400.access.SequentialFile
The SequentialFile class represents an AS/400 physical or logical file. The SequentialFile class allows the user to do the following:
Constructor Summary | |
SequentialFile()
Constructs a SequentialFile object. |
|
SequentialFile(AS400 system,
java.lang.String name)
Constructs a SequentialFile object. |
Method Summary | |
void |
deleteRecord(int recordNumber)
Deletes the record specified by record number. |
void |
positionCursor(int recordNumber)
Positions the file cursor to the first record whose record number matches the specified record number. |
void |
positionCursorAfter(int recordNumber)
Positions the file cursor to the first record after the record specified by the record number. |
void |
positionCursorBefore(int recordNumber)
Positions the file cursor to the first record before the record specified by the record number. |
Record |
read(int recordNumber)
Reads the record with the specified record number. |
Record |
readAfter(int recordNumber)
Reads the first record after the record with the specified record number. |
Record[] |
readAll()
Reads all the records in the file. |
Record |
readBefore(int recordNumber)
Reads the first record before the record with the specified record number. |
void |
update(int recordNumber,
Record record)
Updates the record at the position specified by the record number. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SequentialFile()
public SequentialFile(AS400 system, java.lang.String name)
system
- The AS/400 system to which to connect. The system cannot
be null.name
- The integrated file system pathname of the file. The name
cannot be null.Method Detail |
public void deleteRecord(int recordNumber) throws AS400Exception, AS400SecurityException, java.lang.InterruptedException, java.io.IOException
recordNumber
- The record number of the record to be deleted.AS400Exception
- If the AS/400 system returns an error message.AS400SecurityException
- If a security or authority error occurs.ConnectionDroppedException
- If the connection is dropped unexpectedly.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the AS/400.public void positionCursor(int recordNumber) throws AS400Exception, AS400SecurityException, java.lang.InterruptedException, java.io.IOException
recordNumber
- The record number of the record at which to position the
cursor.AS400Exception
- If the AS/400 system returns an error message.AS400SecurityException
- If a security or authority error occurs.ConnectionDroppedException
- If the connection is dropped unexpectedly.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the AS/400.public void positionCursorAfter(int recordNumber) throws AS400Exception, AS400SecurityException, java.lang.InterruptedException, java.io.IOException
recordNumber
- The record number of the record after which to position the
cursor. The recordNumber must be greater than zero.AS400Exception
- If the AS/400 system returns an error message.AS400SecurityException
- If a security or authority error occurs.ConnectionDroppedException
- If the connection is dropped unexpectedly.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the AS/400.public void positionCursorBefore(int recordNumber) throws AS400Exception, AS400SecurityException, java.lang.InterruptedException, java.io.IOException
recordNumber
- The record number of the record before which to position
the cursor. The recordNumber must be greater than zero.AS400Exception
- If the AS/400 system returns an error message.AS400SecurityException
- If a security or authority error occurs.ConnectionDroppedException
- If the connection is dropped unexpectedly.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the AS/400.public Record read(int recordNumber) throws AS400Exception, AS400SecurityException, java.lang.InterruptedException, java.io.IOException
recordNumber
- The record number of the record to be read. The
recordNumber must be greater than zero.AS400Exception
- If the AS/400 system returns an error message.AS400SecurityException
- If a security or authority error occurs.ConnectionDroppedException
- If the connection is dropped unexpectedly.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the AS/400.public Record readAfter(int recordNumber) throws AS400Exception, AS400SecurityException, java.lang.InterruptedException, java.io.IOException
recordNumber
- record number of the record prior to the record to be read.
The recordNumber must be greater than zero.AS400Exception
- If the AS/400 system returns an error message.AS400SecurityException
- If a security or authority error occurs.ConnectionDroppedException
- If the connection is dropped unexpectedly.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the AS/400.public Record[] readAll() throws AS400Exception, AS400SecurityException, java.lang.InterruptedException, java.io.IOException
readAll
in class AS400File
AS400Exception
- If the AS/400 system returns an error message.AS400SecurityException
- If a security or authority error occurs.ConnectionDroppedException
- If the connection is dropped unexpectedly.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the AS/400.ServerStartupException
- If the AS/400 server cannot be started.java.net.UnknownHostException
- If the AS/400 system cannot be located.public Record readBefore(int recordNumber) throws AS400Exception, AS400SecurityException, java.lang.InterruptedException, java.io.IOException
recordNumber
- The record number of the record after the record to be read.
The recordNumber must be greater than zero.AS400Exception
- If the AS/400 system returns an error message.AS400SecurityException
- If a security or authority error occurs.ConnectionDroppedException
- If the connection is dropped unexpectedly.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the AS/400.public void update(int recordNumber, Record record) throws AS400Exception, AS400SecurityException, java.lang.InterruptedException, java.io.IOException
recordNumber
- The record number of the record to update.
The recordNumber must be greater than zero.record
- The record with which to update.AS400Exception
- If the AS/400 system returns an error message.AS400SecurityException
- If a security or authority error occurs.ConnectionDroppedException
- If the connection is dropped unexpectedly.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the AS/400.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |