ucar.netcdf
Class RemoteAccessorImpl_Stub

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteStub
              |
              +--ucar.netcdf.RemoteAccessorImpl_Stub
All Implemented Interfaces:
Accessor, java.rmi.Remote, RemoteAccessor, java.io.Serializable

public final class RemoteAccessorImpl_Stub
extends java.rmi.server.RemoteStub
implements RemoteAccessor, java.rmi.Remote

See Also:
Serialized Form

Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
RemoteAccessorImpl_Stub()
           
RemoteAccessorImpl_Stub(java.rmi.server.RemoteRef ref)
           
 
Method Summary
 void copyin(int[] $param_arrayOf_int_1, MultiArray $param_MultiArray_2)
          Aggregate write access.
 MultiArray copyout(int[] $param_arrayOf_int_1, int[] $param_arrayOf_int_2)
          Aggregate read access.
 java.lang.Object get(int[] $param_arrayOf_int_1)
          Get (read) the array element at index.
 boolean getBoolean(int[] $param_arrayOf_int_1)
          Get the array element at index, as a boolean.
 byte getByte(int[] $param_arrayOf_int_1)
          Get the array element at index, as a byte.
 char getChar(int[] $param_arrayOf_int_1)
          Get the array element at index, as a char.
 double getDouble(int[] $param_arrayOf_int_1)
          Get the array element at index, as a double.
 float getFloat(int[] $param_arrayOf_int_1)
          Get the array element at index, as a float.
 int getInt(int[] $param_arrayOf_int_1)
          Get the array element at index, as an int.
 long getLong(int[] $param_arrayOf_int_1)
          Get the array element at index, as a long.
 short getShort(int[] $param_arrayOf_int_1)
          Get the array element at index, as a short.
 void set(int[] $param_arrayOf_int_1, java.lang.Object $param_Object_2)
          Set (modify, write) the array element at index to the specified value.
 void setBoolean(int[] $param_arrayOf_int_1, boolean $param_boolean_2)
          Set the array element at index to the specified boolean value.
 void setByte(int[] $param_arrayOf_int_1, byte $param_byte_2)
          Set the array element at index to the specified byte value.
 void setChar(int[] $param_arrayOf_int_1, char $param_char_2)
          Set the array element at index to the specified char value.
 void setDouble(int[] $param_arrayOf_int_1, double $param_double_2)
          Set the array element at index to the specified double value.
 void setFloat(int[] $param_arrayOf_int_1, float $param_float_2)
          Set the array element at index to the specified float value.
 void setInt(int[] $param_arrayOf_int_1, int $param_int_2)
          Set the array element at index to the specified int value.
 void setLong(int[] $param_arrayOf_int_1, long $param_long_2)
          Set the array element at index to the specified long value.
 void setShort(int[] $param_arrayOf_int_1, short $param_short_2)
          Set the array element at index to the specified short value.
 java.lang.Object toArray()
          Returns a new array containing all of the elements in this MultiArray.
 java.lang.Object toArray(java.lang.Object $param_Object_1, int[] $param_arrayOf_int_2, int[] $param_arrayOf_int_3)
          Returns an array containing elements of this MultiArray specified by origin and shape, possibly converting the component type.
 
Methods inherited from class java.rmi.server.RemoteStub
setRef
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RemoteAccessorImpl_Stub

public RemoteAccessorImpl_Stub()

RemoteAccessorImpl_Stub

public RemoteAccessorImpl_Stub(java.rmi.server.RemoteRef ref)
Method Detail

copyin

public void copyin(int[] $param_arrayOf_int_1,
                   MultiArray $param_MultiArray_2)
            throws java.rmi.RemoteException
Description copied from interface: Accessor
Aggregate write access. Given a MultiArray, copy it into this at the specified starting index. TODO: clearer specification.

Hopefully this member can be optimized in various situations.

assert(origin[ii] + (source.getLengths())[ii] <= (getLengths())[ii]);

Specified by:
copyin in interface RemoteAccessor
Following copied from interface: ucar.multiarray.Accessor
Parameters:
origin - int array specifying the starting index.
source - MultiArray with the same componentType as this and shape smaller than this.getLengths() - origin

copyout

public MultiArray copyout(int[] $param_arrayOf_int_1,
                          int[] $param_arrayOf_int_2)
                   throws java.rmi.RemoteException
Description copied from interface: Accessor
Aggregate read access. Return a new MultiArray of the same componentType as this, and with shape as specified, which is initialized to the values of this, as clipped to (origin, origin + shape).

It is easier to implement than to specify :-).

The main reason to implement this instead of using the equivalent proxy is for remote or file access.

assert(origin[ii] + shape[ii] <= lengths[ii]);

Specified by:
copyout in interface RemoteAccessor
Following copied from interface: ucar.multiarray.Accessor
Parameters:
origin - int array specifying the starting index.
shape - int array specifying the extents in each dimension. This becomes the shape of the return.
Returns:
the MultiArray with the specified shape

get

public java.lang.Object get(int[] $param_arrayOf_int_1)
                     throws java.rmi.RemoteException
Description copied from interface: Accessor
Get (read) the array element at index. The returned value is wrapped in an object if it has a primitive type. Length of index must be greater than or equal to the rank of this. Values of index components must be less than corresponding values from getLengths().
Specified by:
get in interface RemoteAccessor
Following copied from interface: ucar.multiarray.Accessor
Parameters:
index - MultiArray index
Returns:
Object value at index
Throws:
NullPointerException - If the argument is null.
java.lang.IllegalArgumentException - If the array length of index is too small
java.lang.ArrayIndexOutOfBoundsException - If an index component argument is negative, or if it is greater than or equal to the corresponding dimension length.

getBoolean

public boolean getBoolean(int[] $param_arrayOf_int_1)
                   throws java.rmi.RemoteException
Description copied from interface: Accessor
Get the array element at index, as a boolean.
Specified by:
getBoolean in interface RemoteAccessor
Following copied from interface: ucar.multiarray.Accessor
See Also:
Accessor.get(int[])

getByte

public byte getByte(int[] $param_arrayOf_int_1)
             throws java.rmi.RemoteException
Description copied from interface: Accessor
Get the array element at index, as a byte.
Specified by:
getByte in interface RemoteAccessor
Following copied from interface: ucar.multiarray.Accessor
See Also:
Accessor.get(int[])

getChar

public char getChar(int[] $param_arrayOf_int_1)
             throws java.rmi.RemoteException
Description copied from interface: Accessor
Get the array element at index, as a char.
Specified by:
getChar in interface RemoteAccessor
Following copied from interface: ucar.multiarray.Accessor
See Also:
Accessor.get(int[])

getDouble

public double getDouble(int[] $param_arrayOf_int_1)
                 throws java.rmi.RemoteException
Description copied from interface: Accessor
Get the array element at index, as a double.
Specified by:
getDouble in interface RemoteAccessor
Following copied from interface: ucar.multiarray.Accessor
See Also:
Accessor.get(int[])

getFloat

public float getFloat(int[] $param_arrayOf_int_1)
               throws java.rmi.RemoteException
Description copied from interface: Accessor
Get the array element at index, as a float.
Specified by:
getFloat in interface RemoteAccessor
Following copied from interface: ucar.multiarray.Accessor
See Also:
Accessor.get(int[])

getInt

public int getInt(int[] $param_arrayOf_int_1)
           throws java.rmi.RemoteException
Description copied from interface: Accessor
Get the array element at index, as an int.
Specified by:
getInt in interface RemoteAccessor
Following copied from interface: ucar.multiarray.Accessor
See Also:
Accessor.get(int[])

getLong

public long getLong(int[] $param_arrayOf_int_1)
             throws java.rmi.RemoteException
Description copied from interface: Accessor
Get the array element at index, as a long.
Specified by:
getLong in interface RemoteAccessor
Following copied from interface: ucar.multiarray.Accessor
See Also:
Accessor.get(int[])

getShort

public short getShort(int[] $param_arrayOf_int_1)
               throws java.rmi.RemoteException
Description copied from interface: Accessor
Get the array element at index, as a short.
Specified by:
getShort in interface RemoteAccessor
Following copied from interface: ucar.multiarray.Accessor
See Also:
Accessor.get(int[])

set

public void set(int[] $param_arrayOf_int_1,
                java.lang.Object $param_Object_2)
         throws java.rmi.RemoteException
Description copied from interface: Accessor
Set (modify, write) the array element at index to the specified value. If the array has a primitive component type, the value may be unwrapped. Values of index components must be less than corresponding values from getLengths().
Specified by:
set in interface RemoteAccessor
Following copied from interface: ucar.multiarray.Accessor
Parameters:
index - MultiArray index
value - the new value.
Throws:
NullPointerException - If the index argument is null, or if the array has a primitive component type and the value argument is null
java.lang.IllegalArgumentException - If the array length of index is too small
java.lang.ArrayIndexOutOfBoundsException - If an index component argument is negative, or if it is greater than or equal to the corresponding dimension length.

setBoolean

public void setBoolean(int[] $param_arrayOf_int_1,
                       boolean $param_boolean_2)
                throws java.rmi.RemoteException
Description copied from interface: Accessor
Set the array element at index to the specified boolean value.
Specified by:
setBoolean in interface RemoteAccessor
Following copied from interface: ucar.multiarray.Accessor
See Also:
Accessor.set(int[], java.lang.Object)

setByte

public void setByte(int[] $param_arrayOf_int_1,
                    byte $param_byte_2)
             throws java.rmi.RemoteException
Description copied from interface: Accessor
Set the array element at index to the specified byte value.
Specified by:
setByte in interface RemoteAccessor
Following copied from interface: ucar.multiarray.Accessor
See Also:
Accessor.set(int[], java.lang.Object)

setChar

public void setChar(int[] $param_arrayOf_int_1,
                    char $param_char_2)
             throws java.rmi.RemoteException
Description copied from interface: Accessor
Set the array element at index to the specified char value.
Specified by:
setChar in interface RemoteAccessor
Following copied from interface: ucar.multiarray.Accessor
See Also:
Accessor.set(int[], java.lang.Object)

setDouble

public void setDouble(int[] $param_arrayOf_int_1,
                      double $param_double_2)
               throws java.rmi.RemoteException
Description copied from interface: Accessor
Set the array element at index to the specified double value.
Specified by:
setDouble in interface RemoteAccessor
Following copied from interface: ucar.multiarray.Accessor
See Also:
Accessor.set(int[], java.lang.Object)

setFloat

public void setFloat(int[] $param_arrayOf_int_1,
                     float $param_float_2)
              throws java.rmi.RemoteException
Description copied from interface: Accessor
Set the array element at index to the specified float value.
Specified by:
setFloat in interface RemoteAccessor
Following copied from interface: ucar.multiarray.Accessor
See Also:
Accessor.set(int[], java.lang.Object)

setInt

public void setInt(int[] $param_arrayOf_int_1,
                   int $param_int_2)
            throws java.rmi.RemoteException
Description copied from interface: Accessor
Set the array element at index to the specified int value.
Specified by:
setInt in interface RemoteAccessor
Following copied from interface: ucar.multiarray.Accessor
See Also:
Accessor.set(int[], java.lang.Object)

setLong

public void setLong(int[] $param_arrayOf_int_1,
                    long $param_long_2)
             throws java.rmi.RemoteException
Description copied from interface: Accessor
Set the array element at index to the specified long value.
Specified by:
setLong in interface RemoteAccessor
Following copied from interface: ucar.multiarray.Accessor
See Also:
Accessor.set(int[], java.lang.Object)

setShort

public void setShort(int[] $param_arrayOf_int_1,
                     short $param_short_2)
              throws java.rmi.RemoteException
Description copied from interface: Accessor
Set the array element at index to the specified short value.
Specified by:
setShort in interface RemoteAccessor
Following copied from interface: ucar.multiarray.Accessor
See Also:
Accessor.set(int[], java.lang.Object)

toArray

public java.lang.Object toArray()
                         throws java.rmi.RemoteException
Description copied from interface: Accessor
Returns a new array containing all of the elements in this MultiArray. The returned array is one dimensional. The order of the elements in the result is natural, as if we used an IndexIterator to step through the elements of this MultiArray. The component type of the result is the same as this.

This method acts as bridge between array-based and MultiArray-based APIs.

This method is functionally equivalent to

Object anArray = Array.newInstance(getComponentType(), 1);
int [] origin = new int[getRank()]
int [] shape = getDimensions();
return toArray(anArray, origin, shape);
 
Specified by:
toArray in interface RemoteAccessor
Following copied from interface: ucar.multiarray.Accessor
Returns:
a one dimensional Array containing all the elements in this MultiArray

toArray

public java.lang.Object toArray(java.lang.Object $param_Object_1,
                                int[] $param_arrayOf_int_2,
                                int[] $param_arrayOf_int_3)
                         throws java.rmi.RemoteException
Description copied from interface: Accessor
Returns an array containing elements of this MultiArray specified by origin and shape, possibly converting the component type. The returned array is one dimensional. The order of the elements in the result is natural, as if we used an IndexIterator to step through the elements of this MultiArray.

The anArray argument should be an array. If it is large enough to contain the output, it is used and no new storage is allocated. Otherwise, new storage is allocated with the same component type as the argument, and the data is copied into it.

This method acts as bridge between array-based and MultiArray-based APIs.

This method is similar to copyout(origin, shape).toArray(), but avoids a copy operation and (potentially) an allocation.

NOTE: Implementation of type conversion is deferred until JDK 1.2. Currently, the componentType of anArray must be the same as this

Specified by:
toArray in interface RemoteAccessor
Following copied from interface: ucar.multiarray.Accessor
Returns:
a one dimensional Array containing the specified elements