Code example for BigInteger

Methods: addtoByteArray

    private static byte[] incrementID(byte[] key) {
        BigInteger id = new BigInteger(key);
        id = id.add(BigInteger.valueOf(1));
        return id.toByteArray();
     * Holds the class format key for a class, maintains a reference to the 
     * ObjectStreamClass.  Other fields can be added when we need to store more 
     * information per class. 
    private static class ClassInfo implements Serializable {
        static final long serialVersionUID = 3845446969989650562L;
        private byte[] classID;
        private transient ObjectStreamClass classFormat;