congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
JIArray.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.jinterop.dcom.core.JIArray
constructor

Best Java code snippets using org.jinterop.dcom.core.JIArray.<init> (Showing top 20 results out of 315)

origin: org.openscada.jinterop/org.openscada.jinterop.core

/**
 * Helper method for creating an array of <code>VARIANT</code>s , IDL
 * signature <code>[in, out] SAFEARRAY(VARIANT) *p</code> OR
 * <code>[in,out] VARIANT *pArray</code>. The return value can directly be
 * used in an <code>IJIDispatch</code> call.
 * 
 * @return
 */
public static JIVariant VARIANTARRAY ()
{
  return new JIVariant ( new JIArray ( new JIVariant[] { JIVariant.EMPTY () }, true ), true );
}
origin: org.jinterop/j-interop

/** Helper method for creating an array of <code>VARIANT</code>s , IDL signature <code>[in, out] SAFEARRAY(VARIANT) *p</code> 
 * OR <code>[in,out] VARIANT *pArray</code>. The return value can directly be used in an <code>IJIDispatch</code> call.
 * 
 * @return
 */
public static JIVariant VARIANTARRAY()
{
  return new JIVariant(new JIArray(new JIVariant[]{JIVariant.EMPTY()}, true),true);
}
 
origin: org.kohsuke.jinterop/j-interop

/** Helper method for creating an array of <code>VARIANT</code>s , IDL signature <code>[in, out] SAFEARRAY(VARIANT) *p</code>
 * OR <code>[in,out] VARIANT *pArray</code>. The return value can directly be used in an <code>IJIDispatch</code> call.
 *
 * @return
 */
public static JIVariant VARIANTARRAY()
{
  return new JIVariant(new JIArray(new JIVariant[]{JIVariant.EMPTY()}, true),true);
}
origin: org.openscada.jinterop/org.openscada.jinterop.core

@Override
public void write ( final NetworkDataRepresentation ndr )
{
  JIMarshalUnMarshalHelper.writeOctetArrayLE ( ndr, this.oxid );
  JIMarshalUnMarshalHelper.serialize ( ndr, Short.class, new Short ( (short)1 ), new ArrayList (), JIFlags.FLAG_NULL );
  JIMarshalUnMarshalHelper.serialize ( ndr, JIArray.class, new JIArray ( new Short[] { new Short ( (short)7 ) }, true ), new ArrayList (), JIFlags.FLAG_REPRESENTATION_ARRAY );
}
origin: org.kohsuke.jinterop/j-interop

public void write(NetworkDataRepresentation ndr)
{
  JIMarshalUnMarshalHelper.writeOctetArrayLE(ndr,oxid);
  JIMarshalUnMarshalHelper.serialize(ndr, Short.class, new Short((short)1), new ArrayList(), JIFlags.FLAG_NULL);
  JIMarshalUnMarshalHelper.serialize(ndr, JIArray.class, new JIArray(new Short[]{new Short((short)7)},true), new ArrayList(), JIFlags.FLAG_REPRESENTATION_ARRAY);
}
origin: org.jinterop/j-interop

public void write(NetworkDataRepresentation ndr) 
{
  JIMarshalUnMarshalHelper.writeOctetArrayLE(ndr,oxid);
  JIMarshalUnMarshalHelper.serialize(ndr, Short.class, new Short((short)1), new ArrayList(), JIFlags.FLAG_NULL);
  JIMarshalUnMarshalHelper.serialize(ndr, JIArray.class, new JIArray(new Short[]{new Short((short)7)},true), new ArrayList(), JIFlags.FLAG_REPRESENTATION_ARRAY);
}
 
origin: org.jinterop/j-interop

/** Helper method for creating an array of <code>BSTR</code>s , IDL signature <code>[in, out] SAFEARRAY(BSTR) *p</code>. 
 * The return value can directly be used in an <code>IJIDispatch</code>call.
 * 
 * @return
 */
public static JIVariant BSTRARRAY()
{
  return new JIVariant(new JIArray(new JIString[]{new JIString("")}, true),true);
}
 
origin: org.kohsuke.jinterop/j-interop

/** Helper method for creating an array of <code>BSTR</code>s , IDL signature <code>[in, out] SAFEARRAY(BSTR) *p</code>.
 * The return value can directly be used in an <code>IJIDispatch</code>call.
 *
 * @return
 */
public static JIVariant BSTRARRAY()
{
  return new JIVariant(new JIArray(new JIString[]{new JIString("")}, true),true);
}
origin: org.openscada.jinterop/org.openscada.jinterop.core

/**
 * Helper method for creating an array of <code>BSTR</code>s , IDL signature
 * <code>[in, out] SAFEARRAY(BSTR) *p</code>.
 * The return value can directly be used in an <code>IJIDispatch</code>call.
 * 
 * @return
 */
public static JIVariant BSTRARRAY ()
{
  return new JIVariant ( new JIArray ( new JIString[] { new JIString ( "" ) }, true ), true );
}
origin: org.jinterop/j-interop

public void getTCharArray()
  throws JIException, InterruptedException, UnknownHostException {
  System.gc();
  JICallBuilder callObject = new JICallBuilder( true);
  callObject.setOpnum(6);
  Object results[];
  callObject.addOutParamAsObject(new JIArray(Byte.class, new int[]{50},1,false), JIFlags.FLAG_NULL);
  results = comObject.call(callObject);
  JIArray arrayOfResults = (JIArray)results[0];
  Byte[] arrayOfBytes = (Byte[]) arrayOfResults.getArrayInstance();
  int length = 50;
  for (int i = 0; i < length; i++) {
   System.out.println(arrayOfBytes[i].byteValue());
  }
}
origin: org.openscada.utgard/org.openscada.opc.dcom

public Collection<Integer> queryAvailableLocaleIDs () throws JIException
{
  JICallBuilder callObject = new JICallBuilder ( true );
  callObject.setOpnum ( 2 );
  callObject.addOutParamAsType ( Integer.class, JIFlags.FLAG_NULL );
  callObject.addOutParamAsObject ( new JIPointer ( new JIArray ( Integer.class, null, 1, true ) ), JIFlags.FLAG_NULL );
  Object[] result = getCOMObject ().call ( callObject );
  JIArray resultArray = (JIArray) ( (JIPointer)result[1] ).getReferent ();
  Integer[] intArray = (Integer[])resultArray.getArrayInstance ();
  return Arrays.asList ( intArray );
}
origin: org.openscada.utgard/org.openscada.opc.dcom

public static JIStruct getStruct () throws JIException
{
  JIStruct struct = new JIStruct ();
  struct.addMember ( Integer.class ); // Server handle
  struct.addMember ( Short.class ); // data type
  struct.addMember ( Short.class ); // reserved
  struct.addMember ( Integer.class ); // access rights
  struct.addMember ( Integer.class ); // blob size
  // grab the normally unused byte array
  struct.addMember ( new JIPointer ( new JIArray ( Byte.class, null, 1, true, false ) ) );
  return struct;
}
origin: org.jinterop/j-interop

public Object[] next(int celt) throws JIException
{
  JICallBuilder callObject = new JICallBuilder(true);
  callObject.setOpnum(0);
  callObject.addInParamAsInt(celt,JIFlags.FLAG_NULL);
  callObject.addOutParamAsObject(new JIArray(JIVariant.class,null,1,true,true),JIFlags.FLAG_NULL);
  callObject.addOutParamAsType(Integer.class,JIFlags.FLAG_NULL);
  Object[] result = comObject.call(callObject);
  return result;
}
 
origin: org.kohsuke.jinterop/j-interop

public Object[] next(int celt) throws JIException
{
  JICallBuilder callObject = new JICallBuilder(true);
  callObject.setOpnum(0);
  callObject.addInParamAsInt(celt,JIFlags.FLAG_NULL);
  callObject.addOutParamAsObject(new JIArray(JIVariant.class,null,1,true,true),JIFlags.FLAG_NULL);
  callObject.addOutParamAsType(Integer.class,JIFlags.FLAG_NULL);
  Object[] result = comObject.call(callObject);
  return result;
}
origin: org.openscada.jinterop/org.openscada.jinterop.core

@Override
public Object[] next ( final int celt ) throws JIException
{
  final JICallBuilder callObject = new JICallBuilder ( true );
  callObject.setOpnum ( 0 );
  callObject.addInParamAsInt ( celt, JIFlags.FLAG_NULL );
  callObject.addOutParamAsObject ( new JIArray ( JIVariant.class, null, 1, true, true ), JIFlags.FLAG_NULL );
  callObject.addOutParamAsType ( Integer.class, JIFlags.FLAG_NULL );
  final Object[] result = this.comObject.call ( callObject );
  return result;
}
origin: org.kohsuke.jinterop/j-interop

  public Object[] findName(JIString nameBuf,int hashValue,short found) throws JIException
  {
    JICallBuilder callObject = new JICallBuilder(true);
    callObject.setOpnum(8);
    callObject.addInParamAsString((nameBuf).getString(),nameBuf.getType());
    callObject.addInParamAsInt(hashValue,JIFlags.FLAG_NULL);
    callObject.addInParamAsShort(found,JIFlags.FLAG_NULL);

    callObject.addOutParamAsObject(new JIArray(IJIComObject.class,null,1,true,true),JIFlags.FLAG_NULL);
    callObject.addOutParamAsObject(new JIArray(Integer.class,null,1,true,true),JIFlags.FLAG_NULL);
    callObject.addOutParamAsType(Short.class,JIFlags.FLAG_NULL);
    callObject.addOutParamAsObject(new JIString(JIFlags.FLAG_REPRESENTATION_STRING_BSTR),JIFlags.FLAG_NULL);

    return comObject.call(callObject);
  }
}
origin: org.jinterop/j-interop

  public Object[] findName(JIString nameBuf,int hashValue,short found) throws JIException
  {
    JICallBuilder callObject = new JICallBuilder(true);
    callObject.setOpnum(8);
    callObject.addInParamAsString((nameBuf).getString(),nameBuf.getType());
    callObject.addInParamAsInt(hashValue,JIFlags.FLAG_NULL);
    callObject.addInParamAsShort(found,JIFlags.FLAG_NULL);
    
    callObject.addOutParamAsObject(new JIArray(IJIComObject.class,null,1,true,true),JIFlags.FLAG_NULL);
    callObject.addOutParamAsObject(new JIArray(Integer.class,null,1,true,true),JIFlags.FLAG_NULL);
    callObject.addOutParamAsType(Short.class,JIFlags.FLAG_NULL);
    callObject.addOutParamAsObject(new JIString(JIFlags.FLAG_REPRESENTATION_STRING_BSTR),JIFlags.FLAG_NULL);
    
    return comObject.call(callObject);
  }
}
origin: org.kohsuke.jinterop/j-interop

public void GetStruct(String[] args)
  throws JIException, InterruptedException, UnknownHostException {
  JICallBuilder callObject = new JICallBuilder( true);
  callObject.setOpnum(10); //obtained from the IDL or TypeLib. //
  Object results[];
  // change the struct to have the array as the last item
  JIStruct struct = new JIStruct();
  JIArray longArray = new JIArray(Integer.class, new int[]{50},1,false);
  struct.addMember(Integer.class);
  struct.addMember(Float.class);
  struct.addMember(longArray);
  callObject.addOutParamAsObject(new JIPointer(struct), JIFlags.FLAG_NULL);
  results = comObject.call(callObject);
  System.out.println(results[0]);
}
origin: org.openscada.jinterop/org.openscada.jinterop.core

public void GetStruct ( final String[] args ) throws JIException, InterruptedException, UnknownHostException
{
  final JICallBuilder callObject = new JICallBuilder ( true );
  callObject.setOpnum ( 10 ); //obtained from the IDL or TypeLib. //
  Object results[];
  // change the struct to have the array as the last item
  final JIStruct struct = new JIStruct ();
  final JIArray longArray = new JIArray ( Integer.class, new int[] { 50 }, 1, false );
  struct.addMember ( Integer.class );
  struct.addMember ( Float.class );
  struct.addMember ( longArray );
  callObject.addOutParamAsObject ( new JIPointer ( struct ), JIFlags.FLAG_NULL );
  results = this.comObject.call ( callObject );
  System.out.println ( results[0] );
}
origin: org.openscada.jinterop/org.openscada.jinterop.core

  @Override
  public Object[] findName ( final JIString nameBuf, final int hashValue, final short found ) throws JIException
  {
    final JICallBuilder callObject = new JICallBuilder ( true );
    callObject.setOpnum ( 8 );
    callObject.addInParamAsString ( nameBuf.getString (), nameBuf.getType () );
    callObject.addInParamAsInt ( hashValue, JIFlags.FLAG_NULL );
    callObject.addInParamAsShort ( found, JIFlags.FLAG_NULL );

    callObject.addOutParamAsObject ( new JIArray ( IJIComObject.class, null, 1, true, true ), JIFlags.FLAG_NULL );
    callObject.addOutParamAsObject ( new JIArray ( Integer.class, null, 1, true, true ), JIFlags.FLAG_NULL );
    callObject.addOutParamAsType ( Short.class, JIFlags.FLAG_NULL );
    callObject.addOutParamAsObject ( new JIString ( JIFlags.FLAG_REPRESENTATION_STRING_BSTR ), JIFlags.FLAG_NULL );

    return this.comObject.call ( callObject );
  }
}
org.jinterop.dcom.coreJIArray<init>

Javadoc

Creates an array object of the type specified by clazz. This is used to prepare a template for decoding an array of that type. Used only for setting as an [out] parameter in a JICallBuilder.

For example:-
This call creates a template for a single dimension Integer array of size 10.
JIArray array = new JIArray(Integer.class,new int[]{10},1,false);

Popular methods of JIArray

  • getArrayInstance
    Returns the nested Array.
  • computeLengthArray
  • decode
  • encode
  • getArrayClass
    Class of the nested Array.
  • getConformantMaxCounts
  • getDimensions
    Returns the dimensions of the Array.
  • getNumElementsInAllDimensions
  • getSizeOfAllElementsInBytes
  • getUpperBounds
    Array of integers depicting highest index for each dimension.
  • init
  • init2
  • init,
  • init2,
  • isConformant,
  • isVarying,
  • recurseDecode,
  • reverseArrayForDispatch,
  • setConformant,
  • setMaxCountAndUpperBounds,
  • updateClazz

Popular in Java

  • Making http requests using okhttp
  • setScale (BigDecimal)
  • notifyDataSetChanged (ArrayAdapter)
  • addToBackStack (FragmentTransaction)
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • JFrame (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now