com.sybase.afx.util
Class BinaryUtil

java.lang.Object
  extended by com.sybase.afx.util.BinaryUtil

public abstract class BinaryUtil
extends java.lang.Object


Constructor Summary
BinaryUtil()
           
 
Method Summary
static boolean equal(byte[] a, byte[] b)
           
static byte[] fromStringBase16(java.lang.String string)
          Convert from hexadecimal string to byte array.
static byte[] fromStringBase16(java.lang.String string, int offset, int length)
          Convert from hexadecimal string to byte array.
static byte[] fromStringBase64(java.lang.String base64String)
          Convert from byte array to base 64 encoded string.
static byte[] getBinary()
           
static byte[] getBinary(byte[] list)
           
static byte[] getBinary(java.lang.String string)
           
static byte[] getBinaryBase64(java.lang.String string)
           
static byte[] getNullableBinary(java.lang.String string)
           
static byte[] getNullableBinaryBase64(java.lang.String string)
           
static boolean notEqual(byte[] a, byte[] b)
           
static java.lang.String toStringBase16(byte[] bytes)
          Convert from byte array to hexadecimal string.
static java.lang.String toStringBase16(byte[] bytes, int offset, int length)
          Convert from byte array to hexadecimal string.
static java.lang.String toStringBase64(byte[] bytes)
          Convert from byte array to base 64 encoded string.
static java.lang.String toStringBase64(byte[] bytes, boolean wrap)
           
static java.lang.String toStringBase64(byte[] bytes, int offset, int length)
           
static java.lang.String toStringBase64(byte[] bytes, int offset, int length, boolean wrap)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryUtil

public BinaryUtil()
Method Detail

getBinary

public static byte[] getBinary()

getBinary

public static byte[] getBinary(byte[] list)

getBinary

public static byte[] getBinary(java.lang.String string)

getNullableBinary

public static byte[] getNullableBinary(java.lang.String string)

getNullableBinaryBase64

public static byte[] getNullableBinaryBase64(java.lang.String string)

getBinaryBase64

public static byte[] getBinaryBase64(java.lang.String string)

equal

public static boolean equal(byte[] a,
                            byte[] b)

notEqual

public static boolean notEqual(byte[] a,
                               byte[] b)

fromStringBase16

public static byte[] fromStringBase16(java.lang.String string)
Convert from hexadecimal string to byte array.


fromStringBase16

public static byte[] fromStringBase16(java.lang.String string,
                                      int offset,
                                      int length)
Convert from hexadecimal string to byte array.


toStringBase16

public static java.lang.String toStringBase16(byte[] bytes)
Convert from byte array to hexadecimal string.


toStringBase16

public static java.lang.String toStringBase16(byte[] bytes,
                                              int offset,
                                              int length)
Convert from byte array to hexadecimal string.


toStringBase64

public static java.lang.String toStringBase64(byte[] bytes)
Convert from byte array to base 64 encoded string.


toStringBase64

public static java.lang.String toStringBase64(byte[] bytes,
                                              boolean wrap)

toStringBase64

public static java.lang.String toStringBase64(byte[] bytes,
                                              int offset,
                                              int length)

toStringBase64

public static java.lang.String toStringBase64(byte[] bytes,
                                              int offset,
                                              int length,
                                              boolean wrap)

fromStringBase64

public static byte[] fromStringBase64(java.lang.String base64String)
Convert from byte array to base 64 encoded string. Code adapted from apache xml security project.