public final class DefaultPhysicalFile extends Object implements PhysicalFile
PhysicalFile
implementation.
Note:
This implementation is not thread-safe.
Constructor and Description |
---|
DefaultPhysicalFile(int format,
FileOperations fileOperations,
Properties properties)
Creates a new
DefaultPhysicalFile instance. |
Modifier and Type | Method and Description |
---|---|
LogicalFile |
add(Header header) |
LogicalFile |
addLogicalFile(Header header) |
void |
commit() |
int |
count() |
LogicalFile |
get(int dtausId) |
LogicalFile |
getLogicalFile(int index) |
int |
getLogicalFileCount() |
void |
remove(int dtausId) |
void |
removeLogicalFile(int index) |
public DefaultPhysicalFile(int format, FileOperations fileOperations, Properties properties) throws IOException
DefaultPhysicalFile
instance.format
- The format of the new instance.fileOperations
- The FileOperations
implementation to operate on.properties
- Configuration properties.NullPointerException
- if either fileOperations
or properties
is null
.IllegalArgumentException
- if format
is not equal to FORMAT_DISK
and FORMAT_TAPE
.IOException
- wenn nicht gelesen werden kann.PhysicalFileFactory.FORMAT_DISK
,
PhysicalFileFactory.FORMAT_TAPE
public LogicalFile add(Header header) throws IOException
add
in interface PhysicalFile
IOException
public LogicalFile addLogicalFile(Header header) throws IOException
addLogicalFile
in interface PhysicalFile
IOException
public void commit() throws IOException
commit
in interface PhysicalFile
IOException
public int count()
count
in interface PhysicalFile
public LogicalFile get(int dtausId)
get
in interface PhysicalFile
public LogicalFile getLogicalFile(int index) throws IOException
getLogicalFile
in interface PhysicalFile
IOException
public int getLogicalFileCount() throws IOException
getLogicalFileCount
in interface PhysicalFile
IOException
public void remove(int dtausId) throws IOException
remove
in interface PhysicalFile
IOException
public void removeLogicalFile(int index) throws IOException
removeLogicalFile
in interface PhysicalFile
IOException
Copyright © 2005–2014 jDTAUS. All rights reserved.