public class SimpleDatabase extends org.linguafranca.pwdb.base.AbstractDatabase<SimpleDatabase,SimpleGroup,SimpleEntry,SimpleIcon>
Database using the Simple XML framework.| Constructor and Description |
|---|
SimpleDatabase()
Create a new empty database
|
SimpleDatabase(KeePassFile file,
org.linguafranca.pwdb.StreamFormat<?> streamFormat) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBinary(byte[] bytes,
int index) |
void |
enableRecycleBin(boolean enable) |
List<KeePassFile.Binary> |
getBinaries() |
String |
getDescription() |
String |
getName() |
SimpleGroup |
getRecycleBin() |
SimpleGroup |
getRootGroup() |
org.linguafranca.pwdb.StreamFormat<?> |
getStreamFormat() |
boolean |
isRecycleBinEnabled() |
static SimpleDatabase |
load(org.linguafranca.pwdb.Credentials credentials,
InputStream inputStream)
Load kdbx file
|
static SimpleDatabase |
loadXml(InputStream inputStream)
Load plaintext XML
|
SimpleEntry |
newEntry() |
SimpleGroup |
newGroup() |
SimpleIcon |
newIcon() |
SimpleIcon |
newIcon(Integer integer) |
void |
save(org.linguafranca.pwdb.Credentials credentials,
OutputStream outputStream)
Save the database with the same stream format that it was loaded with, or V4 default if none
|
<C extends org.linguafranca.pwdb.StreamConfiguration> |
save(org.linguafranca.pwdb.StreamFormat<C> streamFormat,
org.linguafranca.pwdb.Credentials credentials,
OutputStream outputStream)
Save the database with a choice of stream format
|
void |
setDescription(String s) |
void |
setName(String s) |
boolean |
shouldProtect(String s) |
deleteEntry, deleteGroup, emptyRecycleBin, findEntries, findEntries, findEntry, findGroup, getPropertyValueStrategy, isDirty, listShouldProtect, newEntry, newEntry, newGroup, newGroup, setDirty, setPropertyValueStrategy, setShouldProtect, supportsBinaryProperties, supportsNonStandardPropertyNames, supportsPropertyValueStrategy, supportsRecycleBin, visit, visitpublic SimpleDatabase()
public SimpleDatabase(KeePassFile file, org.linguafranca.pwdb.StreamFormat<?> streamFormat)
public static SimpleDatabase loadXml(InputStream inputStream) throws Exception
inputStream - contains the XMLException - on load failurepublic static SimpleDatabase load(org.linguafranca.pwdb.Credentials credentials, InputStream inputStream) throws IOException
credentials - credentials to useinputStream - where to load fromIOExceptionpublic void save(org.linguafranca.pwdb.Credentials credentials,
OutputStream outputStream)
throws IOException
credentials - credentials to useoutputStream - where to write toIOExceptionpublic <C extends org.linguafranca.pwdb.StreamConfiguration> void save(org.linguafranca.pwdb.StreamFormat<C> streamFormat,
org.linguafranca.pwdb.Credentials credentials,
OutputStream outputStream)
throws IOException
streamFormat - the format to usecredentials - credentials to useoutputStream - where to write toIOExceptionpublic SimpleGroup getRootGroup()
public SimpleGroup newGroup()
public SimpleEntry newEntry()
public SimpleIcon newIcon()
public SimpleIcon newIcon(Integer integer)
public boolean isRecycleBinEnabled()
public void enableRecycleBin(boolean enable)
public SimpleGroup getRecycleBin()
public String getName()
public void setName(String s)
public String getDescription()
public void setDescription(String s)
public boolean shouldProtect(String s)
shouldProtect in interface org.linguafranca.pwdb.Database<SimpleDatabase,SimpleGroup,SimpleEntry,SimpleIcon>shouldProtect in class org.linguafranca.pwdb.base.AbstractDatabase<SimpleDatabase,SimpleGroup,SimpleEntry,SimpleIcon>public List<KeePassFile.Binary> getBinaries()
public void addBinary(byte[] bytes,
int index)
public org.linguafranca.pwdb.StreamFormat<?> getStreamFormat()
Copyright © 2025. All rights reserved.