mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 17:53:14 +00:00
loadBitmapInternal, loadBitmap実装
This commit is contained in:
parent
8587c6a707
commit
c28d94e417
|
@ -1,6 +1,7 @@
|
||||||
package one.nem.lacerta.source.file.impl;
|
package one.nem.lacerta.source.file.impl;
|
||||||
|
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
|
import android.graphics.BitmapFactory;
|
||||||
|
|
||||||
import org.w3c.dom.Document;
|
import org.w3c.dom.Document;
|
||||||
|
|
||||||
|
@ -222,6 +223,14 @@ public class FileManagerImpl implements FileManager {
|
||||||
throw new IOException("Failed to load xml");
|
throw new IOException("Failed to load xml");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private Bitmap loadBitmapInternal() throws IOException {
|
||||||
|
try {
|
||||||
|
return BitmapFactory.decodeFile(this.path.toString());
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("loadBitmapInternal", e.getMessage());
|
||||||
|
throw new IOException("Failed to load bitmap");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Document loadXml(String fileName) throws IOException {
|
public Document loadXml(String fileName) throws IOException {
|
||||||
|
@ -236,11 +245,12 @@ public class FileManagerImpl implements FileManager {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Bitmap loadBitmap(String fileName) throws IOException {
|
public Bitmap loadBitmap(String fileName) throws IOException {
|
||||||
return null;
|
this.resolve(fileName);
|
||||||
|
return this.loadBitmapInternal();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Bitmap loadBitmap() throws IOException {
|
public Bitmap loadBitmap() throws IOException {
|
||||||
return null;
|
return this.loadBitmapInternal();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user