Package org.owasp.encoder
Enum CSSEncoder.Mode
- java.lang.Object
-
- java.lang.Enum<CSSEncoder.Mode>
-
- org.owasp.encoder.CSSEncoder.Mode
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<CSSEncoder.Mode>
- Enclosing class:
- CSSEncoder
static enum CSSEncoder.Mode extends java.lang.Enum<CSSEncoder.Mode>
Encoding mode of operation--specified the set of characters that required encoding.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) long
highMask()
Accessor for _highMask.(package private) long
lowMask()
Accessor for _lowMask.static CSSEncoder.Mode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static CSSEncoder.Mode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
STRING
public static final CSSEncoder.Mode STRING
String contexts. Characters between quotes.Not allowed: \n \r \f \\ " ' (everything else is allowed) Allows: "\\{nl}" (escaped newline)
-
URL
public static final CSSEncoder.Mode URL
URL context. Characters inside a "url(...)".Allowed: [!#$%&*-\[\]-~]|{nonascii}|{escape} Escapes: \\[0-9a-f]{1,6}(\s?) \\[^\n\r\f0-9a-f]
-
-
Constructor Detail
-
Mode
private Mode(ASCIIBits bits)
Creates a mode with the specified low and high bit-masks.- Parameters:
bits
- the bit-masks of valid characters.
-
-
Method Detail
-
values
public static CSSEncoder.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 (CSSEncoder.Mode c : CSSEncoder.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 CSSEncoder.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 _lowMask.- Returns:
- _lowMask.
-
highMask
long highMask()
Accessor for _highMask.- Returns:
- _highMask.
-
-