public final class PalDB
extends java.lang.Object
This class is the entry point to obtain StoreReader and
StoreWriter interfaces.
| Modifier and Type | Method and Description |
|---|---|
static StoreReader |
createReader(java.io.File file)
Creates a store reader from the specified
file with a default configuration. |
static StoreReader |
createReader(java.io.File file,
Configuration config)
Creates a store reader from the specified
file. |
static StoreReader |
createReader(java.io.InputStream stream,
Configuration config)
Creates a store reader from the specified
stream. |
static StoreWriter |
createWriter(java.io.File file)
Creates a store writer with the specified
file as destination with a default configuration. |
static StoreWriter |
createWriter(java.io.File file,
Configuration config)
Creates a store writer with the specified
file as destination. |
static StoreWriter |
createWriter(java.io.OutputStream stream,
Configuration config)
Creates a store writer with the specified
stream as destination. |
static Configuration |
newConfiguration()
Creates new configuration with default values.
|
public static StoreReader createReader(java.io.File file)
file with a default configuration.
The file must exists.
file - a PalDB store filepublic static StoreReader createReader(java.io.File file, Configuration config)
file.
The file must exists.
file - a PalDB store fileconfig - configurationpublic static StoreReader createReader(java.io.InputStream stream, Configuration config)
stream.
The reader will read the stream and write its content to a temporary file when this method is called. This is specifically suited for stream coming from the JAR as a resource. The stream will be closed by this method.
stream - an input stream on a PalDB store fileconfig - configurationpublic static StoreWriter createWriter(java.io.File file)
file as destination with a default configuration.
The parent folder is created if missing.
file - location of the output filepublic static StoreWriter createWriter(java.io.File file, Configuration config)
file as destination.
The parent folder is created if missing.
file - location of the output fileconfig - configurationpublic static StoreWriter createWriter(java.io.OutputStream stream, Configuration config)
stream as destination.
The writer will only write bytes to the stream when StoreWriter.close()
is called.
stream - output streamconfig - configurationpublic static Configuration newConfiguration()