Package org.cassandraunit.exception

Examples of org.cassandraunit.exception.CassandraUnitException


                            byteBuffer = ByteBufferSerializer.get().fromBytes(decodedBytes);
                        } else if (isBase64(genericValue)) {
                            decodedBytes = Base64.decode(genericValue);
                            byteBuffer = ByteBufferSerializer.get().fromBytes(decodedBytes);
                        } else {
                            throw new CassandraUnitException("Failed to parse \"" + genericValue + "\" as bytes: unknown binary encoding.");
                        }
                    } catch (DecoderException e) {
                        throw new CassandraUnitException("Failed to parse \"" + genericValue + "\" as bytes", e);
                    }
                    break;
                case DATE_TYPE:
                    try {
                        byteBuffer = DateSerializer.get().toByteBuffer(dateFormat.parse(genericValue));
                    } catch (ParseException e) {
                        throw new CassandraUnitException("cannot parse \"" + genericValue + "\" as date", e);
                    }
                    break;
                case DOUBLE_TYPE:
                    byteBuffer = DoubleSerializer.get().toByteBuffer(Double.parseDouble(genericValue));
                    break;
View Full Code Here

TOP

Related Classes of org.cassandraunit.exception.CassandraUnitException

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.