public final class XmlUtilities
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static <T> javax.xml.bind.JAXBContext |
getContext(java.lang.Class<T> cls) |
static <T> T |
readFromFile(java.lang.Class<T> cls,
java.lang.String path) |
static <T> java.lang.String |
save(T object,
java.lang.String fileName) |
static <T> java.lang.String |
save(T object,
java.lang.String fileName,
java.lang.String extension) |
static void |
saveWithCustomIndentation(java.io.ByteArrayInputStream input,
java.io.FileOutputStream fos,
int indentation)
Saves the XML, contained by the specified input with the custom
indentation.
|
public static void saveWithCustomIndentation(java.io.ByteArrayInputStream input,
java.io.FileOutputStream fos,
int indentation)
input - The input stream that contains the original XML.fos - The output stream that is used to save the XML.indentation - The indentation with which the XML should be saved.public static <T> javax.xml.bind.JAXBContext getContext(java.lang.Class<T> cls)
public static <T> T readFromFile(java.lang.Class<T> cls,
java.lang.String path)
public static <T> java.lang.String save(T object,
java.lang.String fileName)
public static <T> java.lang.String save(T object,
java.lang.String fileName,
java.lang.String extension)