/** * Specifies the name of the charset to use for text-based assertions on the file's contents. * * @param charsetName the name of the charset to use. * @return {@code this} assertion object. * @throws IllegalArgumentException if the given encoding is not supported on this platform. */ public FileAssert usingCharset(String charsetName) { if (!Charset.isSupported(charsetName)) throw new IllegalArgumentException(String.format("Charset:<'%s'> is not supported on this system", charsetName)); return usingCharset(Charset.forName(charsetName)); }