java.nio.charset · java.base · since Java 1.7

StandardCharsets

declaration
public final class StandardCharsets

Constants for the guaranteed charsets — UTF_8 above all. Passing them explicitly at every text/byte boundary is encoding hygiene.

  • UTF_8, US_ASCII, ISO_8859_1, UTF_16 and variants — always present on every JVM