code: private void verifyMagicBytes(TLVInputStream input) throws InvalidPublicationsFileException {
          try {
              byte[] magicBytes = new byte[PUBLICATIONS_FILE_MAGIC_BYTES_LENGTH];
              input.read(magicBytes);
              if (!Arrays.equals(magicBytes, FILE_BEGINNING_MAGIC_BYTES)) {
                  throw new InvalidPublicationsFileException("Invalid publications file magic bytes");
              }
          } catch (IOException e) {
              throw new InvalidPublicationsFileException("Checking publications file magic bytes failed", e);
          }
      }
docs: Verifies that input stream starts with publications file magic bytes.
  
  @param input
  instance of input stream to check. not null.