Package org.owasp.encoder
Enum URIEncoder.Mode
- java.lang.Object
-
- java.lang.Enum<URIEncoder.Mode>
-
- org.owasp.encoder.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.
-
-
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.
-
-
-
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.
-
-
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 namejava.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
-
-