Merge "ExifInterface: Remove throwing exception" into oc-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
48dad606c5
@@ -2101,9 +2101,7 @@ public class ExifInterface {
|
|||||||
private int getMimeType(BufferedInputStream in) throws IOException {
|
private int getMimeType(BufferedInputStream in) throws IOException {
|
||||||
in.mark(SIGNATURE_CHECK_SIZE);
|
in.mark(SIGNATURE_CHECK_SIZE);
|
||||||
byte[] signatureCheckBytes = new byte[SIGNATURE_CHECK_SIZE];
|
byte[] signatureCheckBytes = new byte[SIGNATURE_CHECK_SIZE];
|
||||||
if (in.read(signatureCheckBytes) != SIGNATURE_CHECK_SIZE) {
|
in.read(signatureCheckBytes);
|
||||||
throw new EOFException();
|
|
||||||
}
|
|
||||||
in.reset();
|
in.reset();
|
||||||
if (isJpegFormat(signatureCheckBytes)) {
|
if (isJpegFormat(signatureCheckBytes)) {
|
||||||
return IMAGE_TYPE_JPEG;
|
return IMAGE_TYPE_JPEG;
|
||||||
|
|||||||
Reference in New Issue
Block a user