BinaryInputStream bis = new BinaryInputStream(bytes, APP13_BYTE_ORDER);
// Note that these are unsigned quantities. Name is always an even
// number of bytes (including the 1st byte, which is the size.)
byte[] idString = bis.readByteArray(
PHOTOSHOP_IDENTIFICATION_STRING.length,
"App13 Segment missing identification string");
if (!compareByteArrays(idString, PHOTOSHOP_IDENTIFICATION_STRING))
throw new ImageReadException("Not a Photoshop App13 Segment");