org.jlab.coda.cMsg.apps
Class B64test

java.lang.Object
  extended by org.jlab.coda.cMsg.apps.B64test

public class B64test
extends java.lang.Object

An example class which creates test base64 endcoding and decoding.


Method Summary
static void intToBytes(int intVal, byte[] b, int off)
          Copies an integer value into 4 bytes of a byte array.
static void main(java.lang.String[] args)
          Run as a stand-alone application.
 void run()
          This method is executed as a thread.
static void shortToBytes(short val, byte[] b, int off)
          Copies a short value into 2 bytes of a byte array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

intToBytes

public static final void intToBytes(int intVal,
                                    byte[] b,
                                    int off)
Copies an integer value into 4 bytes of a byte array.

Parameters:
intVal - integer value
b - byte array
off - offset into the byte array

shortToBytes

public static final void shortToBytes(short val,
                                      byte[] b,
                                      int off)
Copies a short value into 2 bytes of a byte array.

Parameters:
val - short value
b - byte array
off - offset into the byte array

main

public static void main(java.lang.String[] args)
Run as a stand-alone application.


run

public void run()
This method is executed as a thread.