KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > javacard > framework > Util

javacard.framework
Class Util

java.lang.Object
  |
  +--javacard.framework.Util
See Also:
JCSystem

public static final byte arrayCompare(byte[] src,
                                      short srcOff,
                                      byte[] dest,
                                      short destOff,
                                      short length)
                               throws ArrayIndexOutOfBoundsException,
                                      NullPointerException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final short arrayCopy(byte[] src,
                                    short srcOff,
                                    byte[] dest,
                                    short destOff,
                                    short length)
                             throws ArrayIndexOutOfBoundsException,
                                    NullPointerException,
                                    TransactionException
See Also:
JCSystem.getUnusedCommitCapacity()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[231]Merging 2 arrays
By Curro on 2003/04/24 12:46:25  Rate
int a [  ]  =  { 1,2,3,4 } ; 
      int b [  ]  =  { 5,6,7,8 } ; 
  
  
      int nNewValues [  ]  = new int [   ( a.length + b.length )    ] ; 
  
  
      System.arraycopy (  a, 0, nNewValues, 0, a.length  ) ; 
      System.arraycopy (  b, 0, nNewValues, a.length, b.length  ) ; 
  
  
      for (  int i = 0; i  <  nNewValues.length; i++  )  
        System.out.println (  nNewValues [ i ]   ) ;


public static final short arrayCopyNonAtomic(byte[] src,
                                             short srcOff,
                                             byte[] dest,
                                             short destOff,
                                             short length)
                                      throws ArrayIndexOutOfBoundsException,
                                             NullPointerException
See Also:
JCSystem.getUnusedCommitCapacity()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[594]Plainly shift out all the CDATA payload and append mode to the end of the fresh buffer
By Michael Chan JT on 2003/12/30 07:44:30  Rate
/*   plainly shift out all the CDATA payload and append mode to the end of the fresh buffer 
   */
 
  
  
     /** examine the APDU for createDF (  )  for fileSystem under self_Proprietary standards 
    * @return   
    *     < pre >  byte [  ]  operCmdBuffer - CDATA payload  < /pre >  
    */
    
     protected byte [  ]  examineSP_  ( APDU apdu )      {        
                                
        byte buffer [  ]  = apdu.getBuffer (  ) ; 
        apdu.setIncomingAndReceive (  ) ;               // switch to incoming mode 
               
        byte [  ]  operCmdBuffer = new byte [ buffer [ ISO.OFFSET_LC ]  ] ;     
                                  
     Util.arrayCopyNonAtomic ( buffer, ISO.OFFSET_CDATA, operCmdBuffer,  ( short ) 0, buffer [ ISO.OFFSET_LC ]  ) ; 
      
       return operCmdBuffer; 
      } //~ End: examineSP_  (  ) 


public static final short arrayFillNonAtomic(byte[] bArray,
                                             short bOff,
                                             short bLen,
                                             byte bValue)
                                      throws ArrayIndexOutOfBoundsException,
                                             NullPointerException
See Also:
JCSystem.getUnusedCommitCapacity()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final short getShort(byte[] bArray,
                                   short bOff)
                            throws NullPointerException,
                                   ArrayIndexOutOfBoundsException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final short makeShort(byte b1,
                                    byte b2)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final short setShort(byte[] bArray,
                                   short bOff,
                                   short sValue)
                            throws TransactionException,
                                   NullPointerException,
                                   ArrayIndexOutOfBoundsException
See Also:
JCSystem.getUnusedCommitCapacity()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  

Popular Tags