Class PageUtils


  • public class PageUtils
    extends Object
    • Constructor Summary

      Constructors 
      Constructor Description
      PageUtils()  
    • Constructor Detail

      • PageUtils

        public PageUtils()
    • Method Detail

      • getByte

        public static byte getByte​(long addr,
                                   int off)
        Parameters:
        addr - Start address.
        off - Offset.
        Returns:
        Byte value from given address.
      • getUnsignedByte

        public static int getUnsignedByte​(long addr,
                                          int off)
        Parameters:
        addr - Start address.
        off - Offset.
        Returns:
        Byte value from given address.
      • getBytes

        public static byte[] getBytes​(long addr,
                                      int off,
                                      int len)
        Parameters:
        addr - Start address.
        off - Offset.
        len - Bytes length.
        Returns:
        Bytes from given address.
      • getBytes

        public static void getBytes​(long srcAddr,
                                    int srcOff,
                                    byte[] dst,
                                    int dstOff,
                                    int len)
        Parameters:
        srcAddr - Source address.
        srcOff - Source offset.
        dst - Destination array.
        dstOff - Destination offset.
        len - Length.
      • getShort

        public static short getShort​(long addr,
                                     int off)
        Parameters:
        addr - Address.
        off - Offset.
        Returns:
        Value.
      • getInt

        public static int getInt​(long addr,
                                 int off)
        Parameters:
        addr - Address.
        off - Offset.
        Returns:
        Value.
      • getLong

        public static long getLong​(long addr,
                                   int off)
        Parameters:
        addr - Address.
        off - Offset.
        Returns:
        Value.
      • putBytes

        public static void putBytes​(long addr,
                                    int off,
                                    byte[] bytes)
        Parameters:
        addr - Address.
        off - Offset.
        bytes - Bytes.
      • putBytes

        public static void putBytes​(long addr,
                                    int off,
                                    byte[] bytes,
                                    int bytesOff)
        Parameters:
        addr - Address.
        off - Offset.
        bytes - Bytes array.
        bytesOff - Bytes array offset.
      • putBytes

        public static void putBytes​(long addr,
                                    int off,
                                    byte[] bytes,
                                    int bytesOff,
                                    int len)
        Parameters:
        addr - Address.
        off - Offset.
        bytes - Bytes array.
        bytesOff - Bytes array offset.
        len - Length.
      • putByte

        public static void putByte​(long addr,
                                   int off,
                                   byte v)
        Parameters:
        addr - Address.
        off - Offset.
        v - Value.
      • putUnsignedByte

        public static void putUnsignedByte​(long addr,
                                           int off,
                                           int v)
        Parameters:
        addr - Address.
        off - Offset.
        v - Value.
      • putShort

        public static void putShort​(long addr,
                                    int off,
                                    short v)
        Parameters:
        addr - Address.
        off - Offset.
        v - Value.
      • putInt

        public static void putInt​(long addr,
                                  int off,
                                  int v)
        Parameters:
        addr - Address.
        off - Offset.
        v - Value.
      • putLong

        public static void putLong​(long addr,
                                   int off,
                                   long v)
        Parameters:
        addr - Address.
        off - Offset.
        v - Value.