public class DefaultDatabaseMaker extends Object implements DatabaseMaker
Constructor and Description |
---|
DefaultDatabaseMaker() |
Modifier and Type | Method and Description |
---|---|
boolean |
canOpenForWriting(File name) |
boolean |
canOpenForWriting(String name) |
boolean |
databaseExists(File name) |
boolean |
databaseExists(String name) |
boolean |
databaseIsValid(File name) |
boolean |
databaseIsValid(String name) |
protected File |
databaseNameToFile(String name) |
Database |
openDatabase(File name,
String mode)
This should open the specified database.
|
Database |
openDatabase(File name,
String mode,
boolean ignoreInconsistentState)
This should open the specified database.
|
Database |
openDatabase(String name,
String mode)
This should open the specified database.
|
Database |
openDatabase(String name,
String mode,
boolean ignoreInconsistentState)
This should open the specified database.
|
public Database openDatabase(String name, String mode) throws IOException, ReadOnlyException
openDatabase
in interface DatabaseMaker
name
- The name for the database (either with our without a file extension).mode
- The mode for opening, either "r" or "rw".IOException
- if the database was not found or could not be opened or initialized.ReadOnlyException
public Database openDatabase(File name, String mode) throws IOException, ReadOnlyException
openDatabase
in interface DatabaseMaker
name
- A File object referring to the Database (either with our without a file extension).mode
- The mode for opening, either "r" or "rw".IOException
- if the database was not found or could not be opened or initialized.ReadOnlyException
public Database openDatabase(String name, String mode, boolean ignoreInconsistentState) throws IOException, ReadOnlyException
openDatabase
in interface DatabaseMaker
name
- The name for the database (either with our without a file extension).mode
- The mode for opening, either "r" or "rw".IOException
- if the database was not found or could not be opened or initialized.ReadOnlyException
public Database openDatabase(File name, String mode, boolean ignoreInconsistentState) throws IOException, ReadOnlyException
openDatabase
in interface DatabaseMaker
name
- A File object referring to the Database (either with our without a file extension).mode
- The mode for opening, either "r" or "rw".IOException
- if the database was not found or could not be opened or initialized.ReadOnlyException
public boolean databaseExists(String name)
databaseExists
in interface DatabaseMaker
public boolean databaseExists(File name)
databaseExists
in interface DatabaseMaker
public boolean databaseIsValid(String name)
databaseIsValid
in interface DatabaseMaker
public boolean databaseIsValid(File name)
databaseIsValid
in interface DatabaseMaker
public boolean canOpenForWriting(String name)
canOpenForWriting
in interface DatabaseMaker
public boolean canOpenForWriting(File name)
canOpenForWriting
in interface DatabaseMaker