Package org.owasp.encoder
Class ASCIIBits
- java.lang.Object
-
- org.owasp.encoder.ASCIIBits
-
class ASCIIBits extends java.lang.Object
ASCIIBits - Small helper class for building up 128-bit bit-mask (2 longs) to be used testing lower-ASCII characters. It helps make some other code easier to read. It is not intended to be public.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) long
_lowerMask
Lower 64 bits.(package private) long
_upperMask
Upper 64 bits.
-
Constructor Summary
Constructors Constructor Description ASCIIBits()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) ASCIIBits
clear(char min, char max)
Sets a range of characters to 0s in the masks.(package private) ASCIIBits
clear(java.lang.String chars)
Clears the bit (sets to 0) for each character in the argument string.(package private) ASCIIBits
set(int min, int max)
Sets a range of characters to 1s in the masks.(package private) ASCIIBits
set(java.lang.String chars)
Sets a bit to 1 for each character in the argument string.
-
-
-
Method Detail
-
set
ASCIIBits set(java.lang.String chars)
Sets a bit to 1 for each character in the argument string. No checking is performed to see if characters are in the valid range 0..127.- Parameters:
chars
- the characters to set to 1.- Returns:
this
-
clear
ASCIIBits clear(java.lang.String chars)
Clears the bit (sets to 0) for each character in the argument string.- Parameters:
chars
- the characters to clear.- Returns:
this
-
set
ASCIIBits set(int min, int max)
Sets a range of characters to 1s in the masks.- Parameters:
min
- the minimum (inclusive).max
- the maximum (inclusive).- Returns:
this
-
clear
ASCIIBits clear(char min, char max)
Sets a range of characters to 0s in the masks.- Parameters:
min
- the minimum (inclusive).max
- the maximum (inclusive).- Returns:
this
-
-