public void readSignature(final InputStream in) throws ImagingException, IOException {
        BinaryFunctions.readAndVerifyBytes(in, PngConstants.PNG_SIGNATURE, "Not a Valid PNG Segment: Incorrect Signature");

    }
Reads reads the signature.

@param in an input stream.
@throws ImagingException In the event that the specified content does not conform to the format of the specific parser implementation.
@throws IOException      In the event of unsuccessful data read operation.
src/main/java/org/apache/commons/imaging/formats/png/PngImageParser.java