mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 17:53:14 +00:00
saveBitmapInternal実装
This commit is contained in:
parent
76f4a6c228
commit
0736a7326a
|
@ -185,6 +185,15 @@ public class FileManagerImpl implements FileManager {
|
||||||
throw new IOException("Failed to save xml");
|
throw new IOException("Failed to save xml");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private void saveBitmapInternal(Bitmap bitmap) throws IOException {
|
||||||
|
try {
|
||||||
|
File file = this.path.toFile();
|
||||||
|
bitmap.compress(Bitmap.CompressFormat.PNG, 100, Files.newOutputStream(file.toPath()));
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("saveBitmapInternal", e.getMessage());
|
||||||
|
throw new IOException("Failed to save bitmap");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void saveXml(Document document, String fileName) throws IOException {
|
public void saveXml(Document document, String fileName) throws IOException {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user