Examples of fromCharArray()


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

   *
   */
  public void testCharSafeArray() {
    char sourceData[] = new char[] { 'a', 'b', 'c', 'd' };
    SafeArray saUnderTest = new SafeArray(Variant.VariantVariant, 3);
    saUnderTest.fromCharArray(sourceData);
    char[] extractedFromSafeArray = saUnderTest.toCharArray();
    for (int i = 0; i < extractedFromSafeArray.length; i++) {
      assertEquals("" + i, sourceData[i], extractedFromSafeArray[i]);
    }
    assertEquals("single get failed: ", sourceData[2], saUnderTest
View Full Code Here

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

    System.out.println("Char");
    SafeArray ca = new SafeArray(Variant.VariantShort, 4);
    System.out.println("elem size:" + ca.getElemSize());
    char cack[] = new char[] { 'a', 'b', 'c', 'd' };
    printArray(cack);
    ca.fromCharArray(cack);
    cack = ca.toCharArray();
    printArray(cack);

    char c4[] = new char[4];
    ca.getChars(0, 4, c4, 0);
View Full Code Here

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

    bback = bba2.toByteArray();
    printArray(bback);

    try {
      // this should throw ComException
      bba2.fromCharArray(new char[] { 'a' });
      fail("Failed to catch expected exception");
    } catch (ComFailException cfe) {
      // do nothing
      // cfe.printStackTrace();
    }
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.