Enum StreamEncoding

    • Enum Constant Detail

      • TEXT

        public static final StreamEncoding TEXT
        The Literal packet contains text data, and thus may need line ends converted to local form, or other text-mode changes.
      • UTF8

        public static final StreamEncoding UTF8
        Indication that the implementation believes that the literal data contains UTF-8 text.
      • LOCAL

        @Deprecated
        public static final StreamEncoding LOCAL
        Deprecated.
        Early versions of PGP also defined a value of 'l' as a 'local' mode for machine-local conversions. RFC 1991 [RFC1991] incorrectly stated this local mode flag as '1' (ASCII numeral one). Both of these local modes are deprecated.
    • Method Detail

      • values

        public static StreamEncoding[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (StreamEncoding c : StreamEncoding.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static StreamEncoding valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getCode

        public char getCode()
        Return the code identifier of the encoding.
        Returns:
        identifier
      • fromCode

        public static StreamEncoding fromCode​(int code)
        Return the StreamEncoding corresponding to the provided code identifier.
        Parameters:
        code - identifier
        Returns:
        encoding enum