Enum Packer

    • Enum Constant Detail

      • BIG_ENDIAN

        public static final Packer BIG_ENDIAN
        packers who fill the Least Significant Bit First int and byte packer have the same result on Big Endian architectures
      • LITTLE_ENDIAN

        public static final Packer LITTLE_ENDIAN
        packers who fill the Most Significant Bit first int and byte packer have the same result on Little Endian architectures
    • Method Detail

      • values

        public static Packer[] 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 (Packer c : Packer.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Packer valueOf​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • newIntPacker

        public abstract IntPacker newIntPacker​(int width)
        Parameters:
        width - the width in bits of the packed values
        Returns:
        an int based packer
      • newBytePacker

        public abstract BytePacker newBytePacker​(int width)
        Parameters:
        width - the width in bits of the packed values
        Returns:
        a byte based packer
      • newBytePackerForLong

        public abstract BytePackerForLong newBytePackerForLong​(int width)
        Parameters:
        width - the width in bits of the packed values
        Returns:
        a byte based packer for INT64