/** * Validate the header signature. * * @param input The input to read the signature from * @throws IOException If any read problems occur */ protected static void validateSignature(final DataInput input) throws IOException { final byte[] signatureBytes = new byte[4]; input.readFully(signatureBytes); if (!Arrays.equals(ManagementProtocol.SIGNATURE, signatureBytes)) { throw MESSAGES.invalidSignature(Arrays.toString(signatureBytes)); } }