public static int asciiToMagicWord(@NotNull String ascii) {
    if (ascii.length() != 4) {
      throw new IllegalArgumentException("ascii[" + ascii + "] must be 4 ASCII chars long");
    }
    byte[] bytes = ascii.getBytes(US_ASCII);
    if (bytes.length != 4) {
      throw new IllegalArgumentException("ascii bytes [" + toHexString(bytes) + "].length must be 4");
    }

    return (Byte.toUnsignedInt(bytes[0]) << 24)
           | (Byte.toUnsignedInt(bytes[1]) << 16)
           | (Byte.toUnsignedInt(bytes[2]) << 8)
           | Byte.toUnsignedInt(bytes[3]);
  }
public static int asciiToMagicWord(@NotNull String ascii)