Class ArrayTest


  • public class ArrayTest
    extends java.lang.Object
    Test ways of transferring short[][] arrays.
    • Constructor Summary

      Constructors 
      Constructor Description
      ArrayTest()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      protected static short bytesToshort​(byte[] buffer, int offset)
      Convert bytes to a short.
      static short[][] byteToshort​(byte[] sdata)
      Set the data.
      static void main​(java.lang.String[] args)  
      static byte[] shortToByte​(short[][] data)
      Get the data as a transferable string.
      protected static byte[] shortToBytes​(short val, byte[] buffer, int offset)
      Convert a short to bytes.
      static java.lang.String shortToString​(short[][] data)
      Get the data as a transferable string.
      static short[][] stringToshort​(java.lang.String sdata)
      Set the data.
      • Methods inherited from class java.lang.Object

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

      • ArrayTest

        public ArrayTest()
    • Method Detail

      • shortToString

        public static java.lang.String shortToString​(short[][] data)
        Get the data as a transferable string.
        Returns:
        the data string.
      • stringToshort

        public static short[][] stringToshort​(java.lang.String sdata)
        Set the data.
        Parameters:
        data - The data to set.
      • shortToByte

        public static byte[] shortToByte​(short[][] data)
        Get the data as a transferable string.
        Returns:
        the data string.
      • byteToshort

        public static short[][] byteToshort​(byte[] sdata)
        Set the data.
        Parameters:
        data - The data to set.
      • bytesToshort

        protected static short bytesToshort​(byte[] buffer,
                                            int offset)
        Convert bytes to a short.
      • shortToBytes

        protected static byte[] shortToBytes​(short val,
                                             byte[] buffer,
                                             int offset)
        Convert a short to bytes.
      • main

        public static void main​(java.lang.String[] args)