Class XmlUtilities
java.lang.Object
de.gurkenlabs.litiengine.util.io.XmlUtilities
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> jakarta.xml.bind.JAXBContextgetContext(Class<T> cls) static <T> Tstatic Filestatic Filestatic voidsaveWithCustomIndentation(ByteArrayInputStream input, FileOutputStream fos, int indentation) Saves the XML, contained by the specified input with the custom indentation.
-
Method Details
-
saveWithCustomIndentation
public static void saveWithCustomIndentation(ByteArrayInputStream input, FileOutputStream fos, int indentation) Saves the XML, contained by the specified input with the custom indentation. If the input is the result of jaxb marshalling, make sure to set Marshaller.JAXB_FORMATTED_OUTPUT to false in order for this method to work properly.- Parameters:
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.
-
getContext
-
read
-
save
-
save
-