Enum StreamEncoding

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      BINARY
      The Literal packet contains binary data.
      LOCAL
      Deprecated.
      TEXT
      The Literal packet contains text data, and thus may need line ends converted to local form, or other text-mode changes.
      UTF8
      Indication that the implementation believes that the literal data contains UTF-8 text.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static StreamEncoding fromCode​(int code)
      Return the StreamEncoding corresponding to the provided code identifier.
      char getCode()
      Return the code identifier of the encoding.
      static StreamEncoding valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static StreamEncoding[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • BINARY

        public static final StreamEncoding BINARY
        The Literal packet contains binary data.
      • 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​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.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