Enum URIEncoder.Mode

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<URIEncoder.Mode>
    Enclosing class:
    URIEncoder

    public static enum URIEncoder.Mode
    extends java.lang.Enum<URIEncoder.Mode>
    Encoding mode of operation for URI encodes. The modes define which characters get encoded using %-encoding, and which do not.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      COMPONENT
      In "component" mode, only the unreserved characters are left unescaped.
      FULL_URI
      In "full" mode, all unreserved and reserved characters are left unescaped.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) long _highMask
      The high bit-mask--copied into the _highMask of the encoder.
      (package private) long _lowMask
      The low bit-mask--copied into the _lowMask of the encoder.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Mode​(long low, long high)
      Constructor to create a mode with the specified bit-masks.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) long highMask()
      Accessor for the high bit-mask.
      (package private) long lowMask()
      Accessor for the low bit-mask.
      static URIEncoder.Mode valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static URIEncoder.Mode[] 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

      • COMPONENT

        public static final URIEncoder.Mode COMPONENT
        In "component" mode, only the unreserved characters are left unescaped. Everything else is escaped.
      • FULL_URI

        public static final URIEncoder.Mode FULL_URI
        In "full" mode, all unreserved and reserved characters are left unescaped. Anything else is escaped.
    • Field Detail

      • _lowMask

        final long _lowMask
        The low bit-mask--copied into the _lowMask of the encoder.
      • _highMask

        final long _highMask
        The high bit-mask--copied into the _highMask of the encoder.
    • Constructor Detail

      • Mode

        private Mode​(long low,
                     long high)
        Constructor to create a mode with the specified bit-masks.
        Parameters:
        low - the low bit-mask (characters 0 to 63)
        high - the high bit-mask (characters 64 to 127)
    • Method Detail

      • values

        public static URIEncoder.Mode[] 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 (URIEncoder.Mode c : URIEncoder.Mode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static URIEncoder.Mode 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
      • lowMask

        long lowMask()
        Accessor for the low bit-mask.
        Returns:
        _lowMask
      • highMask

        long highMask()
        Accessor for the high bit-mask.
        Returns:
        _highMask