mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2025-02-17 00:03:15 +00:00
修正
This commit is contained in:
parent
e0a344bb48
commit
e20b3f4a35
|
@ -171,14 +171,13 @@ public class FileManagerImpl implements FileManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Internal
|
// Internal
|
||||||
private void saveXmlInternal(Document document, String fileName) throws IOException {
|
private void saveXmlInternal(Document document) throws IOException {
|
||||||
try {
|
try {
|
||||||
TransformerFactory transformerFactory = TransformerFactory.newInstance();
|
TransformerFactory transformerFactory = TransformerFactory.newInstance();
|
||||||
Transformer transformer = transformerFactory.newTransformer();
|
Transformer transformer = transformerFactory.newTransformer();
|
||||||
DOMSource source = new DOMSource(document);
|
DOMSource source = new DOMSource(document);
|
||||||
|
|
||||||
File file = this.path.resolve(fileName).toFile();
|
StreamResult result = new StreamResult(this.path.toFile());
|
||||||
StreamResult result = new StreamResult(file);
|
|
||||||
|
|
||||||
transformer.transform(source, result);
|
transformer.transform(source, result);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user