Class AionUtilities


  • public class AionUtilities
    extends java.lang.Object
    A collection of methods to facilitate contract development.
    • Constructor Summary

      Constructors 
      Constructor Description
      AionUtilities()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static byte[] padLeft​(byte[] topic)
      Returns a new byte array of length 32 that right-aligns the input bytes by padding them on the left with 0.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AionUtilities

        public AionUtilities()
    • Method Detail

      • padLeft

        public static byte[] padLeft​(byte[] topic)
        Returns a new byte array of length 32 that right-aligns the input bytes by padding them on the left with 0. Note that the input is not truncated if it is larger than 32 bytes. This method can be used to pad log topics.
        Parameters:
        topic - bytes to pad
        Returns:
        Zero padded topic
        Throws:
        java.lang.NullPointerException - if topic is null