mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2026-11-02 11:37:37 +00:00
リファクタリング
This commit is contained in:
1 file changed
+1
-2
@@ -187,8 +187,7 @@ public class FileManagerImpl implements FileManager {
|
|||||||
}
|
}
|
||||||
private void saveBitmapInternal(Bitmap bitmap) throws IOException {
|
private void saveBitmapInternal(Bitmap bitmap) throws IOException {
|
||||||
try {
|
try {
|
||||||
File file = this.path.toFile();
|
bitmap.compress(Bitmap.CompressFormat.PNG, 100, Files.newOutputStream(this.path));
|
||||||
bitmap.compress(Bitmap.CompressFormat.PNG, 100, Files.newOutputStream(file.toPath()));
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("saveBitmapInternal", e.getMessage());
|
logger.error("saveBitmapInternal", e.getMessage());
|
||||||
throw new IOException("Failed to save bitmap");
|
throw new IOException("Failed to save bitmap");
|
||||||
|
|||||||
Reference in new issue
Block a user