Class WebHelper

java.lang.Object
com.onenetwork.platform.tools.util.WebHelper

public abstract class WebHelper
extends java.lang.Object
Web helper
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static char[] digits
    All possible chars for representing a number as a String
    static int HEX_MASK  
    static int HEX_SHIFT  
  • 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)
    Check Character is alphanumeric
    static 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • 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.e 0001, 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.e 1, 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)
      Check Character is alphanumeric
      Parameters:
      ch -