Class DBInstanceStore


  • public class DBInstanceStore
    extends java.lang.Object
    • Constructor Detail

      • DBInstanceStore

        public DBInstanceStore​(java.lang.String dbName)
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • intArrayToByteArray

        public static byte[] intArrayToByteArray​(int[] src)
        Convert an array of integers to an array of bytes by copying the bits of each int to four bytes. Based on code at java2s.com.
      • byteArrayToIntArray

        public static int[] byteArrayToIntArray​(byte[] src)
        Convert an array of bytes to an array of integers by copying the bits directly. Based on code at java2s.com.
      • saveAlphabets

        public void saveAlphabets​(Alphabet dataAlphabet,
                                  Alphabet targetAlphabet)
                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • saveInstances

        public void saveInstances​(java.util.Iterator<Instance> iterator)
                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • cleanup

        public void cleanup()
                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception