読み書きのインタフェースを実装

This commit is contained in:
r-ca 2024-01-09 12:31:31 +09:00
parent 0dced5d0dc
commit 91fe39d141
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -21,6 +21,9 @@ public interface FileManager {
boolean isReadable(); boolean isReadable();
Document readXml(); Document readXml();
// Get current instance
FileManager getCurrentInstance();
// Configure // Configure
FileManager enableAutoCreateParent(); FileManager enableAutoCreateParent();
FileManager disableRootDirCheck(); FileManager disableRootDirCheck();
@ -28,4 +31,24 @@ public interface FileManager {
FileManager setRootDir(Path rootDir); FileManager setRootDir(Path rootDir);
FileManager setPath(Path path); FileManager setPath(Path path);
FileManager resolve(String path) throws IOException; FileManager resolve(String path) throws IOException;
// Save
// XML
FileManager saveXml(Document document, String fileName) throws IOException;
FileManager saveXml(Document document) throws IOException;
// Bitmap
FileManager saveBitmap(Bitmap bitmap, String fileName) throws IOException; // TODO-rca: パラメータに対応させる
FileManager saveBitmap(Bitmap bitmap) throws IOException; // TODO-rca: パラメータに対応させる
// Load
// XML
Document loadXml(String fileName) throws IOException;
Document loadXml() throws IOException;
// Bitmap
Bitmap loadBitmap(String fileName) throws IOException;
Bitmap loadBitmap() throws IOException;
} }