Examples of fromShortArray()


Examples of com.jacob.com.SafeArray.fromShortArray()

    System.out.println("Short");
    SafeArray sha = new SafeArray(Variant.VariantShort, 4);
    System.out.println("elem size:" + sha.getElemSize());
    short shack[] = new short[] { 1000, 2000, 3000, 4000 };
    printArray(shack);
    sha.fromShortArray(shack);
    shack = sha.toShortArray();
    printArray(shack);

    short sh4[] = new short[4];
    sha.getShorts(0, 4, sh4, 0);
View Full Code Here

Examples of com.jacob.com.SafeArray.fromShortArray()

   */
  public void testShortSafeArray() {
    short sourceData[] = new short[] { 1, 2, 3 };
    SafeArray saUnderTest = new SafeArray(Variant.VariantVariant, 3);

    saUnderTest.fromShortArray(sourceData);
    short[] extractedFromSafeArray = saUnderTest.toShortArray();
    for (int i = 0; i < extractedFromSafeArray.length; i++) {
      assertEquals("" + i, sourceData[i], extractedFromSafeArray[i]);
    }

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.