edu.stanford.nlp.maxent.iis
Class Convert

java.lang.Object
  |
  +--edu.stanford.nlp.maxent.iis.Convert

public final class Convert
extends Object

This is used to convert an array of double into byte array which makes it possible to keep it more efficiently.


Field Summary
static String codeTable
           
 
Constructor Summary
Convert()
           
 
Method Summary
static char asciiToChar(byte b)
           
static String asciiToNative(byte[] b)
           
static String asciiToNative(byte[] b, int off, int i)
           
static void aStringArrToByteArr(byte[] b, int pos, String[] s, int off, int length)
           
static byte[] aStringArrToByteArr(String[] s)
           
static byte[] aStringArrToByteArr(String[] s, int off, int length)
           
static byte[] booleanArrToByteArr(boolean[] b)
           
static byte[] booleanArrToByteArr(boolean[] b, int off, int len)
           
static void booleanArrToByteArr(byte[] bytes, int pos, boolean[] b, int off, int length)
           
static String byteArrToAString(byte[] b)
           
static String byteArrToAString(byte[] b, int off, int length)
           
static String[] byteArrToAStringArr(byte[] b)
           
static String[] byteArrToAStringArr(byte[] b, int off, int length)
           
static void byteArrToAStringArr(byte[] b, int off, String[] s, int pos, int length)
           
static boolean byteArrToBoolean(byte[] b, int off)
           
static boolean[] byteArrToBooleanArr(byte[] b)
           
static void byteArrToBooleanArr(byte[] b, int off, boolean[] bool, int pos, int length)
           
static boolean[] byteArrToBooleanArr(byte[] b, int off, int length)
           
static char byteArrToChar(byte[] b, int off)
           
static char[] byteArrToCharArr(byte[] b)
           
static void byteArrToCharArr(byte[] b, int off, char[] c, int pos, int length)
           
static char[] byteArrToCharArr(byte[] b, int off, int length)
           
static double byteArrToDouble(byte[] b, int off)
           
static double[] byteArrToDoubleArr(byte[] b)
           
static void byteArrToDoubleArr(byte[] b, int off, double[] d, int pos, int length)
           
static double[] byteArrToDoubleArr(byte[] b, int off, int length)
           
static float byteArrToFloat(byte[] b, int off)
           
static float[] byteArrToFloatArr(byte[] b)
           
static void byteArrToFloatArr(byte[] b, int off, float[] f, int pos, int length)
           
static float[] byteArrToFloatArr(byte[] b, int off, int length)
           
static int byteArrToInt(byte[] b, int off)
           
static int[] byteArrToIntArr(byte[] b)
           
static int[] byteArrToIntArr(byte[] b, int off, int length)
           
static void byteArrToIntArr(byte[] b, int off, int[] i, int pos, int length)
           
static long byteArrToLong(byte[] b, int off)
           
static long[] byteArrToLongArr(byte[] b)
           
static long[] byteArrToLongArr(byte[] b, int off, int length)
           
static void byteArrToLongArr(byte[] b, int off, long[] l, int pos, int length)
           
static short byteArrToShort(byte[] b, int off)
           
static short[] byteArrToShortArr(byte[] b)
           
static short[] byteArrToShortArr(byte[] b, int off, int length)
           
static void byteArrToShortArr(byte[] b, int off, short[] s, int pos, int length)
           
static String byteArrToUString(byte[] b)
           
static String byteArrToUString(byte[] b, int off, int strLen)
           
static String[] byteArrToUStringArr(byte[] b)
           
static String[] byteArrToUStringArr(byte[] b, int off, int length)
           
static void byteArrToUStringArr(byte[] b, int off, String[] s, int pos, int length)
           
static void charArrToByteArr(byte[] b, int pos, char[] c, int off, int len)
           
static byte[] charArrToByteArr(char[] c)
           
static byte[] charArrToByteArr(char[] c, int off, int len)
           
static byte charToAscii(char c)
           
static void doubleArrToByteArr(byte[] b, int pos, double[] d, int off, int length)
           
static byte[] doubleArrToByteArr(double[] d)
           
static byte[] doubleArrToByteArr(double[] d, int off, int length)
           
static void floatArrToByteArr(byte[] b, int pos, float[] f, int off, int len)
           
static byte[] floatArrToByteArr(float[] f)
           
static byte[] floatArrToByteArr(float[] f, int off, int length)
           
static String getEncoding()
           
static void intArrToByteArr(byte[] b, int pos, int[] i, int off, int len)
           
static byte[] intArrToByteArr(int[] i)
           
static byte[] intArrToByteArr(int[] i, int off, int length)
           
static void longArrToByteArr(byte[] b, int pos, long[] l, int off, int length)
           
static byte[] longArrToByteArr(long[] l)
           
static byte[] longArrToByteArr(long[] l, int off, int length)
           
static void main(String[] str)
           
static byte[] nativeToAscii(String s)
           
static void shortArrToByteArr(byte[] b, int pos, short[] s, int off, int len)
           
static byte[] shortArrToByteArr(short[] s)
           
static byte[] shortArrToByteArr(short[] s, int off, int length)
           
static byte[] stringAToByteArr(String s)
           
static byte[] stringUToByteArr(String s)
           
static void uStringArrToByteArr(byte[] b, int pos, String[] s, int off, int length)
           
static byte[] uStringArrToByteArr(String[] s)
           
static byte[] uStringArrToByteArr(String[] s, int off, int length)
           
static void writeAStringToByteArr(byte[] b, int off, String s)
           
static void writeAStringToByteArr(byte[] b, int off, String s, int pos, int length)
           
static void writeBooleanToByteArr(byte[] b, int off, boolean bool)
           
static void writeCharToByteArr(byte[] b, int off, char c)
           
static void writeDoubleToByteArr(byte[] b, int off, double d)
           
static void writeFloatToByteArr(byte[] b, int off, float f)
           
static void writeIntToByteArr(byte[] b, int off, int i)
           
static void writeLongToByteArr(byte[] b, int off, long l)
           
static void writeShortToByteArr(byte[] b, int off, short s)
           
static void writeUStringToByteArr(byte[] b, int off, String s)
           
static void writeUStringToByteArr(byte[] b, int off, String s, int pos, int length)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

codeTable

public static final String codeTable
See Also:
Constant Field Values
Constructor Detail

Convert

public Convert()
Method Detail

main

public static void main(String[] str)

getEncoding

public static String getEncoding()

nativeToAscii

public static byte[] nativeToAscii(String s)

asciiToNative

public static String asciiToNative(byte[] b)

asciiToNative

public static String asciiToNative(byte[] b,
                                   int off,
                                   int i)

charToAscii

public static byte charToAscii(char c)

asciiToChar

public static char asciiToChar(byte b)

writeIntToByteArr

public static void writeIntToByteArr(byte[] b,
                                     int off,
                                     int i)

writeLongToByteArr

public static void writeLongToByteArr(byte[] b,
                                      int off,
                                      long l)

writeFloatToByteArr

public static void writeFloatToByteArr(byte[] b,
                                       int off,
                                       float f)

writeDoubleToByteArr

public static void writeDoubleToByteArr(byte[] b,
                                        int off,
                                        double d)

writeBooleanToByteArr

public static void writeBooleanToByteArr(byte[] b,
                                         int off,
                                         boolean bool)

writeCharToByteArr

public static void writeCharToByteArr(byte[] b,
                                      int off,
                                      char c)

writeShortToByteArr

public static void writeShortToByteArr(byte[] b,
                                       int off,
                                       short s)

writeUStringToByteArr

public static void writeUStringToByteArr(byte[] b,
                                         int off,
                                         String s)

writeUStringToByteArr

public static void writeUStringToByteArr(byte[] b,
                                         int off,
                                         String s,
                                         int pos,
                                         int length)

writeAStringToByteArr

public static void writeAStringToByteArr(byte[] b,
                                         int off,
                                         String s)

writeAStringToByteArr

public static void writeAStringToByteArr(byte[] b,
                                         int off,
                                         String s,
                                         int pos,
                                         int length)

byteArrToInt

public static int byteArrToInt(byte[] b,
                               int off)

byteArrToShort

public static short byteArrToShort(byte[] b,
                                   int off)

byteArrToFloat

public static float byteArrToFloat(byte[] b,
                                   int off)

byteArrToDouble

public static double byteArrToDouble(byte[] b,
                                     int off)

byteArrToLong

public static long byteArrToLong(byte[] b,
                                 int off)

byteArrToBoolean

public static boolean byteArrToBoolean(byte[] b,
                                       int off)

byteArrToChar

public static char byteArrToChar(byte[] b,
                                 int off)

byteArrToUString

public static String byteArrToUString(byte[] b)

byteArrToUString

public static String byteArrToUString(byte[] b,
                                      int off,
                                      int strLen)

byteArrToAString

public static String byteArrToAString(byte[] b)

byteArrToAString

public static String byteArrToAString(byte[] b,
                                      int off,
                                      int length)

stringUToByteArr

public static byte[] stringUToByteArr(String s)

stringAToByteArr

public static byte[] stringAToByteArr(String s)

intArrToByteArr

public static byte[] intArrToByteArr(int[] i)

intArrToByteArr

public static byte[] intArrToByteArr(int[] i,
                                     int off,
                                     int length)

intArrToByteArr

public static void intArrToByteArr(byte[] b,
                                   int pos,
                                   int[] i,
                                   int off,
                                   int len)

longArrToByteArr

public static byte[] longArrToByteArr(long[] l)

longArrToByteArr

public static byte[] longArrToByteArr(long[] l,
                                      int off,
                                      int length)

longArrToByteArr

public static void longArrToByteArr(byte[] b,
                                    int pos,
                                    long[] l,
                                    int off,
                                    int length)

booleanArrToByteArr

public static byte[] booleanArrToByteArr(boolean[] b)

booleanArrToByteArr

public static byte[] booleanArrToByteArr(boolean[] b,
                                         int off,
                                         int len)

booleanArrToByteArr

public static void booleanArrToByteArr(byte[] bytes,
                                       int pos,
                                       boolean[] b,
                                       int off,
                                       int length)

charArrToByteArr

public static byte[] charArrToByteArr(char[] c)

charArrToByteArr

public static byte[] charArrToByteArr(char[] c,
                                      int off,
                                      int len)

charArrToByteArr

public static void charArrToByteArr(byte[] b,
                                    int pos,
                                    char[] c,
                                    int off,
                                    int len)

floatArrToByteArr

public static byte[] floatArrToByteArr(float[] f)

floatArrToByteArr

public static byte[] floatArrToByteArr(float[] f,
                                       int off,
                                       int length)

floatArrToByteArr

public static void floatArrToByteArr(byte[] b,
                                     int pos,
                                     float[] f,
                                     int off,
                                     int len)

doubleArrToByteArr

public static byte[] doubleArrToByteArr(double[] d)

doubleArrToByteArr

public static byte[] doubleArrToByteArr(double[] d,
                                        int off,
                                        int length)

doubleArrToByteArr

public static void doubleArrToByteArr(byte[] b,
                                      int pos,
                                      double[] d,
                                      int off,
                                      int length)

shortArrToByteArr

public static byte[] shortArrToByteArr(short[] s)

shortArrToByteArr

public static byte[] shortArrToByteArr(short[] s,
                                       int off,
                                       int length)

shortArrToByteArr

public static void shortArrToByteArr(byte[] b,
                                     int pos,
                                     short[] s,
                                     int off,
                                     int len)

uStringArrToByteArr

public static byte[] uStringArrToByteArr(String[] s)

uStringArrToByteArr

public static byte[] uStringArrToByteArr(String[] s,
                                         int off,
                                         int length)

uStringArrToByteArr

public static void uStringArrToByteArr(byte[] b,
                                       int pos,
                                       String[] s,
                                       int off,
                                       int length)

aStringArrToByteArr

public static byte[] aStringArrToByteArr(String[] s)

aStringArrToByteArr

public static byte[] aStringArrToByteArr(String[] s,
                                         int off,
                                         int length)

aStringArrToByteArr

public static void aStringArrToByteArr(byte[] b,
                                       int pos,
                                       String[] s,
                                       int off,
                                       int length)

byteArrToIntArr

public static int[] byteArrToIntArr(byte[] b)

byteArrToIntArr

public static int[] byteArrToIntArr(byte[] b,
                                    int off,
                                    int length)

byteArrToIntArr

public static void byteArrToIntArr(byte[] b,
                                   int off,
                                   int[] i,
                                   int pos,
                                   int length)

byteArrToLongArr

public static long[] byteArrToLongArr(byte[] b)

byteArrToLongArr

public static long[] byteArrToLongArr(byte[] b,
                                      int off,
                                      int length)

byteArrToLongArr

public static void byteArrToLongArr(byte[] b,
                                    int off,
                                    long[] l,
                                    int pos,
                                    int length)

byteArrToBooleanArr

public static boolean[] byteArrToBooleanArr(byte[] b)

byteArrToBooleanArr

public static boolean[] byteArrToBooleanArr(byte[] b,
                                            int off,
                                            int length)

byteArrToBooleanArr

public static void byteArrToBooleanArr(byte[] b,
                                       int off,
                                       boolean[] bool,
                                       int pos,
                                       int length)

byteArrToCharArr

public static char[] byteArrToCharArr(byte[] b)

byteArrToCharArr

public static char[] byteArrToCharArr(byte[] b,
                                      int off,
                                      int length)

byteArrToCharArr

public static void byteArrToCharArr(byte[] b,
                                    int off,
                                    char[] c,
                                    int pos,
                                    int length)

byteArrToShortArr

public static short[] byteArrToShortArr(byte[] b)

byteArrToShortArr

public static short[] byteArrToShortArr(byte[] b,
                                        int off,
                                        int length)

byteArrToShortArr

public static void byteArrToShortArr(byte[] b,
                                     int off,
                                     short[] s,
                                     int pos,
                                     int length)

byteArrToFloatArr

public static float[] byteArrToFloatArr(byte[] b)

byteArrToFloatArr

public static float[] byteArrToFloatArr(byte[] b,
                                        int off,
                                        int length)

byteArrToFloatArr

public static void byteArrToFloatArr(byte[] b,
                                     int off,
                                     float[] f,
                                     int pos,
                                     int length)

byteArrToDoubleArr

public static double[] byteArrToDoubleArr(byte[] b)

byteArrToDoubleArr

public static double[] byteArrToDoubleArr(byte[] b,
                                          int off,
                                          int length)

byteArrToDoubleArr

public static void byteArrToDoubleArr(byte[] b,
                                      int off,
                                      double[] d,
                                      int pos,
                                      int length)

byteArrToUStringArr

public static String[] byteArrToUStringArr(byte[] b)

byteArrToUStringArr

public static String[] byteArrToUStringArr(byte[] b,
                                           int off,
                                           int length)

byteArrToUStringArr

public static void byteArrToUStringArr(byte[] b,
                                       int off,
                                       String[] s,
                                       int pos,
                                       int length)

byteArrToAStringArr

public static String[] byteArrToAStringArr(byte[] b)

byteArrToAStringArr

public static String[] byteArrToAStringArr(byte[] b,
                                           int off,
                                           int length)

byteArrToAStringArr

public static void byteArrToAStringArr(byte[] b,
                                       int off,
                                       String[] s,
                                       int pos,
                                       int length)


Stanford NLP Group