in src/java/org/apache/fulcrum/jce/crypto/SmartDecryptingInputStream.java [342:367]
private boolean isPDF(byte[] content) throws IOException
{
if( content.length < 64 )
{
return false;
}
else
{
// A PDF starts with HEX "25 50 44 46 2D 31 2E"
if( ( content[0] == (byte) 0x25 ) &&
( content[1] == (byte) 0x50 ) &&
( content[2] == (byte) 0x44 ) &&
( content[3] == (byte) 0x46 ) &&
( content[4] == (byte) 0x2D ) &&
( content[5] == (byte) 0x31 ) &&
( content[6] == (byte) 0x2E ) )
{
return true;
}
else
{
return false;
}
}
}