public interface PhysicalFileFactory
PhysicalFile
instances.
Example: Getting the jDTAUS Banking SPI implementation.
PhysicalFileFactory factory = (PhysicalFileFactory) ContainerFactory.getContainer(). getObject( PhysicalFileFactory.class );
Container
Modifier and Type | Field and Description |
---|---|
static int |
FORMAT_DISK
Constant for the DTAUS disk format.
|
static int |
FORMAT_TAPE
Constant for the DTAUS tape format.
|
Modifier and Type | Method and Description |
---|---|
int |
analyse(File file)
Detects the format by analysing the given
File . |
int |
analyse(FileOperations ops)
Detects the format by analysing the given
FileOperations . |
PhysicalFile |
createPhysicalFile(File file,
int format)
Creates a new
PhysicalFile on a given File . |
PhysicalFile |
createPhysicalFile(File file,
int format,
Properties properties)
Creates a new
PhysicalFile on a given File taking properties to configure the implementation. |
PhysicalFile |
createPhysicalFile(FileOperations ops,
int format)
Creates a new
PhysicalFile on given FileOperations . |
PhysicalFile |
createPhysicalFile(FileOperations ops,
int format,
Properties properties)
Creates a new
PhysicalFile on given FileOperations taking properties to configure the implementation. |
PhysicalFile |
getPhysicalFile(File file)
Reads a
PhysicalFile from a given File . |
PhysicalFile |
getPhysicalFile(FileOperations ops)
Reads a
PhysicalFile from given FileOperations . |
PhysicalFile |
getPhysicalFile(FileOperations ops,
Properties properties)
Reads a
PhysicalFile from given FileOperations taking properties to configure the implementation. |
PhysicalFile |
getPhysicalFile(File file,
Properties properties)
Reads a
PhysicalFile from a given File taking properties to configure the implementation. |
static final int FORMAT_DISK
static final int FORMAT_TAPE
int analyse(File file) throws PhysicalFileException, IOException
File
.file
- The file to analyse.NullPointerException
- if file
is null
.PhysicalFileException
- if file
provides a file containing errors.IOException
- if reading fails.FORMAT_DISK
,
FORMAT_TAPE
,
PhysicalFile.commit()
int analyse(FileOperations ops) throws PhysicalFileException, IOException
FileOperations
.ops
- FileOperations
to analyse.NullPointerException
- if ops
is null
.PhysicalFileException
- if ops
provides a file containing errors.IOException
- if reading fails.FORMAT_DISK
,
FORMAT_TAPE
,
PhysicalFile.commit()
PhysicalFile createPhysicalFile(File file, int format) throws IOException
PhysicalFile
on a given File
.file
- The file to create a new DTAUS file with.format
- Constant for the format of the new DTAUS file.NullPointerException
- if file
is null
.IllegalArgumentException
- if format
is neither FORMAT_DISK
nor FORMAT_TAPE
.IOException
- if creating a new DTAUS file fails.FORMAT_DISK
,
FORMAT_TAPE
,
PhysicalFile.commit()
PhysicalFile createPhysicalFile(File file, int format, Properties properties) throws IOException
PhysicalFile
on a given File
taking properties to configure the implementation.file
- The file to create a new DTAUS file with.format
- Constant for the format of the new DTAUS file.properties
- Properties to be passed to implementations.NullPointerException
- if either file
or properties
is null
.IllegalArgumentException
- if format
is neither FORMAT_DISK
nor FORMAT_TAPE
.IOException
- if creating a new DTAUS file fails.FORMAT_DISK
,
FORMAT_TAPE
,
PhysicalFile.commit()
PhysicalFile createPhysicalFile(FileOperations ops, int format) throws IOException
PhysicalFile
on given FileOperations
.ops
- The FileOperations
to create a new DTAUS file with.format
- Constant for the format of the new DTAUS file.NullPointerException
- if ops
is null
.IllegalArgumentException
- if format
is neither FORMAT_DISK
nor FORMAT_TAPE
.IOException
- if creating a new DTAUS file fails.FORMAT_DISK
,
FORMAT_TAPE
,
PhysicalFile.commit()
PhysicalFile createPhysicalFile(FileOperations ops, int format, Properties properties) throws IOException
PhysicalFile
on given FileOperations
taking properties to configure the implementation.ops
- The FileOperations
to create a new DTAUS file with.format
- Constant for the format of the new DTAUS file.properties
- Properties to be passed to implementations.NullPointerException
- if either ops
or properties
is null
.IllegalArgumentException
- if format
is neither FORMAT_DISK
nor FORMAT_TAPE
.IOException
- if creating a new DTAUS file fails.FORMAT_DISK
,
FORMAT_TAPE
,
PhysicalFile.commit()
PhysicalFile getPhysicalFile(File file) throws PhysicalFileException, IOException
PhysicalFile
from a given File
.file
- The file to create a PhysicalFile
instance from.PhysicalFile
instance for file
.NullPointerException
- if file
is null
.PhysicalFileException
- if file
provides a file containing errors.IOException
- if reading fails.PhysicalFile.commit()
PhysicalFile getPhysicalFile(FileOperations ops) throws PhysicalFileException, IOException
PhysicalFile
from given FileOperations
.ops
- FileOperations
to create a PhysicalFile
instance from.PhysicalFile
instance for ops
.NullPointerException
- if ops
is null
.PhysicalFileException
- if ops
provides a file containing errors.IOException
- if reading fails.PhysicalFile.commit()
PhysicalFile getPhysicalFile(FileOperations ops, Properties properties) throws PhysicalFileException, IOException
PhysicalFile
from given FileOperations
taking properties to configure the implementation.ops
- FileOperations
to create a PhysicalFile
instance from.properties
- properties to be passed to implementations.PhysicalFile
instance for ops
.NullPointerException
- if either ops
or properties
is null
.PhysicalFileException
- if ops
provides a file containing errors.IOException
- if reading fails.PhysicalFile.commit()
PhysicalFile getPhysicalFile(File file, Properties properties) throws PhysicalFileException, IOException
PhysicalFile
from a given File
taking properties to configure the implementation.file
- The file to create a PhysicalFile
instance from.properties
- Properties to be passed to implementations.PhysicalFile
instance for file
.NullPointerException
- if either file
or properties
is null
.PhysicalFileException
- if file
provides a file containing errors.IOException
- if reading fails.PhysicalFile.commit()
Copyright © 2005–2014 jDTAUS. All rights reserved.