mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-05 12:35:29 -04:00
Manage error occuring with non-seekable stream such as URLConnection.
This commit is contained in:
parent
b34770658a
commit
1af9a0c48c
@ -63,7 +63,11 @@ public class TargaImageReaderSpi extends JMagickImageReaderSpiSupport {
|
|||||||
// new byte[] {-1, 0x01, 0x20}, // Type 31: Compressed CM
|
// new byte[] {-1, 0x01, 0x20}, // Type 31: Compressed CM
|
||||||
// new byte[] {-1, 0x01, 0x21}, // Type 32: Compressed CM, 4 pass
|
// new byte[] {-1, 0x01, 0x21}, // Type 32: Compressed CM, 4 pass
|
||||||
// },
|
// },
|
||||||
pSource.seek(pSource.length() - 18);
|
try {
|
||||||
|
pSource.seek(pSource.length() - 18);
|
||||||
|
} catch (IndexOutOfBoundsException e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
byte[] magic = new byte[18];
|
byte[] magic = new byte[18];
|
||||||
pSource.readFully(magic);
|
pSource.readFully(magic);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user