Package org.chaidb.db.exception

Examples of org.chaidb.db.exception.EncodingException


            byte[] ret = new byte[baa.length * 8];
            for (int i = 0; i < baa.length; i++)
                System.arraycopy(baa[i], 0, ret, i * 8, 8);
            return ret;
        } catch (ClassCastException cce) {
            throw new EncodingException("Invalid input type for converter");
        }
    }
View Full Code Here


     * @param key   The key associated with this entry
     * @param bytes A one dimensional byte array containing concatenated IDs
     * @return A byte[][] which represents an array of ids
     */
    public Object decodeFromByteArray(Key key, byte[] bytes) throws EncodingException {
        if ((bytes.length % 8) != 0) throw new EncodingException("Trailing garbage in input");
        byte[][] ret = new byte[bytes.length / 8][8];
        for (int i = 0; i < ret.length; i++)
            System.arraycopy(bytes, i * 8, ret[i], 0, 8);
        return ret;
    }
View Full Code Here

            for (int j = 0; j < numNewValues; i++, j++)
                newValues[i] = (byte[]) tbu.get(j);

            return newValues;
        } catch (ClassCastException cce) {
            throw new EncodingException("Input values to this method were of incorrect type");
        }
    }
View Full Code Here

            byte[][] ret = new byte[currentArraySize][];
            for (int i = 0; i < currentArraySize; i++)
                ret[i] = (byte[]) currentArray.get(i);
            return ret;
        } catch (Exception e) {
            throw new EncodingException(e.toString());
        }
    }
View Full Code Here

TOP

Related Classes of org.chaidb.db.exception.EncodingException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.