public class EncryptionXMLUtil extends Object
Utility methods for loading and saving EncryptionKey
with
IXMLConfigurable
objects or other XML-driven classes.
Modifier and Type | Method and Description |
---|---|
static EncryptionKey |
loadFromXML(Reader in,
String tagPrefix,
EncryptionKey defaultKey)
Convenience method for loading an encryption key from an XML reader.
|
static EncryptionKey |
loadFromXML(XMLConfiguration xml,
String tagPrefix,
EncryptionKey defaultKey)
Convenience method for loading an encryption key from an
XMLConfiguration . |
static void |
saveToXML(Writer writer,
String tagPrefix,
EncryptionKey encryptionKey)
Convenience method for saving an encryption key to an XML writer.
|
static void |
saveToXML(XMLStreamWriter writer,
String tagPrefix,
EncryptionKey encryptionKey)
Convenience method for saving an encryption key to an
XMLStreamWriter . |
public static EncryptionKey loadFromXML(Reader in, String tagPrefix, EncryptionKey defaultKey)
in
- an XML readertagPrefix
- prefix of the XML tag names being loaded.defaultKey
- default encryption keyIXMLConfigurable
public static EncryptionKey loadFromXML(XMLConfiguration xml, String tagPrefix, EncryptionKey defaultKey)
XMLConfiguration
.xml
- xml configurationtagPrefix
- prefix of the XML tag names being loaded.defaultKey
- default encryption keyIXMLConfigurable
public static void saveToXML(Writer writer, String tagPrefix, EncryptionKey encryptionKey) throws IOException
writer
- a writertagPrefix
- Prefix of the XML tag names being saved. If
null
, no prefix is used (not recommended unless
wrapped in a parent tag).encryptionKey
- the encryption key to saveIOException
- problem saving to XMLIXMLConfigurable
public static void saveToXML(XMLStreamWriter writer, String tagPrefix, EncryptionKey encryptionKey) throws IOException
XMLStreamWriter
.writer
- an XML writertagPrefix
- Prefix of the XML tag names being saved. If
null
, no prefix is used (not recommended unless
wrapped in a parent tag).encryptionKey
- the encryption key to saveIOException
- problem saving to XMLIXMLConfigurable
Copyright © 2008–2021 Norconex Inc.. All rights reserved.