mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 09:43:15 +00:00
Documentオブジェクト保存メソッド作成
This commit is contained in:
parent
5c0fd4fdbb
commit
73fa8201d6
|
@ -16,6 +16,7 @@ import java.util.List;
|
||||||
import javax.xml.transform.Transformer;
|
import javax.xml.transform.Transformer;
|
||||||
import javax.xml.transform.TransformerFactory;
|
import javax.xml.transform.TransformerFactory;
|
||||||
import javax.xml.transform.dom.DOMSource;
|
import javax.xml.transform.dom.DOMSource;
|
||||||
|
import javax.xml.transform.stream.StreamResult;
|
||||||
|
|
||||||
import dagger.assisted.Assisted;
|
import dagger.assisted.Assisted;
|
||||||
import dagger.assisted.AssistedInject;
|
import dagger.assisted.AssistedInject;
|
||||||
|
@ -230,13 +231,16 @@ public class FileManagerImpl implements FileManager {
|
||||||
Transformer transformer = transformerFactory.newTransformer();
|
Transformer transformer = transformerFactory.newTransformer();
|
||||||
DOMSource source = new DOMSource(document);
|
DOMSource source = new DOMSource(document);
|
||||||
File file = createFile(fileName);
|
File file = createFile(fileName);
|
||||||
|
StreamResult result = new StreamResult(file);
|
||||||
|
transformer.transform(source, result);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void saveDocument(Document document, Path path) {
|
public void saveDocument(Document document, Path path) {
|
||||||
|
// TODO-rca 実装する
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue
Block a user