int units = currency.getUnits(); int fractionalUnits = currency.getFractionalUnits();
public Object deserializeData(NetworkDataRepresentation ndr,List defferedPointers, Map additionalData, int FLAG) { //first align double index = new Integer(ndr.getBuffer().getIndex()).doubleValue(); long i = (i=Math.round(index%8.0)) == 0 ? 0 : 8 - i ; ndr.readOctetArray(new byte[(int)i],0,(int)i); //now read the low byte int lowbyte = ndr.readUnsignedLong(); //hibyte int hibyte = ndr.readUnsignedLong(); if(hibyte < 0) { lowbyte = -1 * Math.abs(lowbyte); } //String newValue = Integer.toHexString(hibyte) + Integer.toHexString(lowbyte); //long value = Long.parseLong(newValue,16); return new JICurrency((int)((lowbyte - lowbyte%10000)/10000),(int)(lowbyte%10000)); } public int getLengthInBytes(Object value,int FLAG)
int units = currency.getUnits(); int fractionalUnits = currency.getFractionalUnits();
@Override public Object deserializeData ( final NetworkDataRepresentation ndr, final List defferedPointers, final Map additionalData, final int FLAG ) { //first align final double index = new Integer ( ndr.getBuffer ().getIndex () ).doubleValue (); long i = ( i = Math.round ( index % 8.0 ) ) == 0 ? 0 : 8 - i; ndr.readOctetArray ( new byte[(int)i], 0, (int)i ); //now read the low byte int lowbyte = ndr.readUnsignedLong (); //hibyte final int hibyte = ndr.readUnsignedLong (); if ( hibyte < 0 ) { lowbyte = -1 * Math.abs ( lowbyte ); } //String newValue = Integer.toHexString(hibyte) + Integer.toHexString(lowbyte); //long value = Long.parseLong(newValue,16); return new JICurrency ( ( lowbyte - lowbyte % 10000 ) / 10000, lowbyte % 10000 ); }
final int units = currency.getUnits (); final int fractionalUnits = currency.getFractionalUnits ();
public Object deserializeData(NetworkDataRepresentation ndr,List defferedPointers, Map additionalData, int FLAG) { //first align double index = new Integer(ndr.getBuffer().getIndex()).doubleValue(); long i = (i=Math.round(index%8.0)) == 0 ? 0 : 8 - i ; ndr.readOctetArray(new byte[(int)i],0,(int)i); //now read the low byte int lowbyte = ndr.readUnsignedLong(); //hibyte int hibyte = ndr.readUnsignedLong(); if(hibyte < 0) { lowbyte = -1 * Math.abs(lowbyte); } //String newValue = Integer.toHexString(hibyte) + Integer.toHexString(lowbyte); //long value = Long.parseLong(newValue,16); return new JICurrency((int)((lowbyte - lowbyte%10000)/10000),(int)(lowbyte%10000)); } public int getLengthInBytes(Object value,int FLAG)
return Variant.valueOf ( ( (long)c.getUnits () << 32L | c.getFractionalUnits () ) / 10000L );
variant2[1].getObjectAsArray (); dispatch.callMethod ( 3, new Object[] { new JIVariant ( new JICurrency ( -1, 0 ), true ) } ); JIVariant[] variant = dispatch.callMethodA ( "testSA", new Object[] { new JIVariant ( new JIVariant ( dispatch, true ) ) } ); variant = dispatch.callMethodA ( "testSA", new Object[] { new JIVariant ( JIVariant.SCODE, 0, true ) } ); dispatch.callMethod ( 3, new Object[] { new JIVariant ( new JICurrency ( -1, 0 ), true ) } );
variant2[1].getObjectAsArray(); dispatch.callMethod(3,new Object[]{new JIVariant(new JICurrency(-1,0),true)}); JIVariant[] variant = dispatch.callMethodA("testSA",new Object[]{new JIVariant(new JIVariant(dispatch,true))}); variant = dispatch.callMethodA("testSA",new Object[]{new JIVariant(JIVariant.SCODE,0,true)}); dispatch.callMethod(3,new Object[]{new JIVariant(new JICurrency(-1,0),true)});
variant2[1].getObjectAsArray(); dispatch.callMethod(3,new Object[]{new JIVariant(new JICurrency(-1,0),true)}); JIVariant[] variant = dispatch.callMethodA("testSA",new Object[]{new JIVariant(new JIVariant(dispatch,true))}); variant = dispatch.callMethodA("testSA",new Object[]{new JIVariant(JIVariant.SCODE,0,true)}); dispatch.callMethod(3,new Object[]{new JIVariant(new JICurrency(-1,0),true)});