Class WebHelper
java.lang.Object
com.onenetwork.platform.tools.util.WebHelper
public abstract class WebHelper
extends java.lang.Object
Web helper
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protected
WebHelper()
-
Method Summary
Modifier and Type Method Description static void
addBoolean(boolean bool, java.util.function.Consumer<java.lang.Character> consumer)
static void
addNull(java.util.function.Consumer<java.lang.Character> consumer)
static boolean
isAlphaNumericCharacter(char ch)
CheckCharacter
is alphanumericstatic void
wirteHexStringWithoutPadToConsumer(int val, java.util.function.Consumer<java.lang.Character> consumer)
Convert the integer to an hex String with padding.static void
wirteHexStringWithPadToConsumer(int val, java.util.function.Consumer<java.lang.Character> consumer)
Convert the integer to an hex String with padding.static void
writeUnsignedIntRecursively(int val, int charPos, int mask, int shift, boolean addPadding, java.util.function.Consumer<java.lang.Character> consumer)
Convert the integer to an unsigned String.
-
Field Details
-
digits
public static final char[] digitsAll possible chars for representing a number as a String -
HEX_SHIFT
public static final int HEX_SHIFT- See Also:
- Constant Field Values
-
HEX_MASK
public static final int HEX_MASK- See Also:
- Constant Field Values
-
-
Constructor Details
-
WebHelper
protected WebHelper()
-
-
Method Details
-
wirteHexStringWithPadToConsumer
public static void wirteHexStringWithPadToConsumer(int val, java.util.function.Consumer<java.lang.Character> consumer)Convert the integer to an hex String with padding. i.e0001
,002f
- Parameters:
val
-consumer
-
-
wirteHexStringWithoutPadToConsumer
public static void wirteHexStringWithoutPadToConsumer(int val, java.util.function.Consumer<java.lang.Character> consumer)Convert the integer to an hex String with padding. i.e1
,2f
- Parameters:
val
-consumer
-
-
writeUnsignedIntRecursively
public static void writeUnsignedIntRecursively(int val, int charPos, int mask, int shift, boolean addPadding, java.util.function.Consumer<java.lang.Character> consumer)Convert the integer to an unsigned String.- Parameters:
val
-charPos
-mask
-shift
-addPadding
-consumer
-
-
addNull
public static void addNull(java.util.function.Consumer<java.lang.Character> consumer) -
addBoolean
public static void addBoolean(boolean bool, java.util.function.Consumer<java.lang.Character> consumer) -
isAlphaNumericCharacter
public static boolean isAlphaNumericCharacter(char ch)CheckCharacter
is alphanumeric- Parameters:
ch
-
-