public interface PhysicalFile
Modifier and Type | Method and Description |
---|---|
LogicalFile |
addLogicalFile(Header header)
Adds a logical file to the physical file.
|
void |
commit()
Commits any pending changes.
|
LogicalFile |
getLogicalFile(int index)
Gets a logical file for an index.
|
int |
getLogicalFileCount()
Gets the number of logical files stored in the physical file.
|
void |
removeLogicalFile(int index)
Removes a logical file from the physical file.
|
LogicalFile addLogicalFile(Header header) throws IOException
header
- The A record of the new logical file.NullPointerException
- if header
is null
.IllegalHeaderException
- if header
holds illegal values.IOException
- if reading or writing fails.void commit() throws IOException
Note:
This method should be called once after finishing work with an instance. Implementations may close any open files
when calling this method so that no more operations will be possible after the method returns. Therefore state of
an instance is undefined after calling this method. Also note that not calling this method may lead to leaking
open file descriptors in the system.
IOException
- if reading or writing fails.LogicalFile getLogicalFile(int index) throws IOException
index
- The index of the logical file to return.index
.IndexOutOfBoundsException
- if index
is either negative, or greater or equal to count()
.IOException
- if reading fails.int getLogicalFileCount() throws IOException
IOException
- if reading fails.void removeLogicalFile(int index) throws IOException
index
- The index of the logical file to remove.IndexOutOfBoundsException
- if index
is either negative, or greater or equal to count()
.IOException
- if reading or writing fails.Copyright © 2005–2014 jDTAUS. All rights reserved.