Package com.jacob.com

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


    SafeArray ia = new SafeArray(Variant.VariantInt, 4);
    System.out.println("elem size:" + ia.getElemSize());
    int iack[] = new int[] { 100000, 200000, 300000, 400000 };
    printArray(iack);
    ia.fromIntArray(iack);
    iack = ia.toIntArray();
    printArray(iack);

    int i4[] = new int[4];
    ia.getInts(0, 4, i4, 0);
    printArray(i4);
View Full Code Here


    ia.getInts(0, 4, i4, 0);
    printArray(i4);

    SafeArray ia2 = new SafeArray(Variant.VariantInt, 4);
    ia2.setInts(0, 4, i4, 0);
    iack = ia2.toIntArray();
    printArray(iack);

    // double
    System.out.println("Double");
    SafeArray da = new SafeArray(Variant.VariantDouble, 4);
View Full Code Here

    assertEquals("single get failed: ", sourceData[2], saUnderTest
        .getShort(2));

    // test conversion
    int[] extractedFromSafeArrayInt = saUnderTest.toIntArray();
    for (int i = 0; i < extractedFromSafeArray.length; i++) {
      assertEquals("" + i, sourceData[i], extractedFromSafeArrayInt[i]);
    }
    // test conversion
    double[] extractedFromSafeArrayDouble = saUnderTest.toDoubleArray();
View Full Code Here

   */
  public void testIntSafeArray() {
    int sourceData[] = new int[] { 100000, 200000, 300000 };
    SafeArray saUnderTest = new SafeArray(Variant.VariantVariant, 3);
    saUnderTest.fromIntArray(sourceData);
    int[] extractedFromSafeArray = saUnderTest.toIntArray();
    for (int i = 0; i < extractedFromSafeArray.length; i++) {
      assertEquals("" + i, sourceData[i], extractedFromSafeArray[i]);
    }
    assertEquals("single get failed: ", sourceData[2], saUnderTest
        .getInt(2));
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.