public class NullBackend extends Object implements Backend
The GNU Lesser General Public License for details.| Constructor and Description |
|---|
NullBackend() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Key key)
Determine whether this Book contains the key in question
|
void |
create()
Create the directory to hold the Book if it does not exist.
|
void |
decipher(byte[] data)
Decipher the data in place, if it is enciphered and there is a key to
unlock it.
|
void |
encipher(byte[] data)
Encipher the data in place, if there is a key to unlock it.
|
SwordBookMetaData |
getBookMetaData() |
Key |
getGlobalKeyList()
Gets the fast global key list, and if this operation is not supported, throws a
UnsupportedOperationException |
String |
getRawText(Key key)
Get the text as it is found in the Book for the given key
|
int |
getRawTextLength(Key key)
Determine the size of the raw data for the key in question.
|
boolean |
isSupported()
Returns whether this AbstractBackend is implemented.
|
boolean |
isWritable()
A Backend is writable if the file system allows the underlying files to
be opened for writing and if the backend has implemented writing.
|
Key |
readIndex()
Initialize a AbstractBackend before use.
|
List |
readToOsis(Key key,
RawTextToXmlProcessor processor)
Get the text allotted for the given entry
|
void |
setAliasKey(Key alias,
Key source) |
public SwordBookMetaData getBookMetaData()
getBookMetaData in interface Backendpublic void decipher(byte[] data)
Backendpublic void encipher(byte[] data)
Backendpublic Key readIndex()
Backendpublic boolean contains(Key key)
Backendpublic String getRawText(Key key) throws BookException
BackendgetRawText in interface Backendkey - the key for which the raw text is desired.BookExceptionpublic void setAliasKey(Key alias, Key source) throws BookException
setAliasKey in interface BackendBookExceptionpublic int getRawTextLength(Key key)
BackendgetRawTextLength in interface Backendkey - The key whose raw data length is desired.public Key getGlobalKeyList() throws BookException
BackendUnsupportedOperationExceptiongetGlobalKeyList in interface BackendBookException - the book exception if for some reason the book failed to be read properly.public List readToOsis(Key key, RawTextToXmlProcessor processor) throws BookException
BackendreadToOsis in interface Backendkey - The key to fetchprocessor - processor that executes before/after the content is read from
disk or another kind of backendBookException - If the data can not be read.public void create()
throws IOException,
BookException
Backendcreate in interface BackendIOExceptionBookExceptionpublic boolean isSupported()
BackendisSupported in interface Backendpublic boolean isWritable()
BackendisWritable in interface Backend