class CassandraBinaryStore extends AbstractBinaryStore {

    @Override
    public InputStream getInputStream( BinaryKey key ) throws BinaryStoreException {
        try {
            ResultSet rs = session.execute("SELECT payload FROM modeshape.binary WHERE cid='" + key.toString() + "'");
            Row row = rs.one();
            if (row == null) {
                throw new BinaryStoreException(JcrI18n.unableToFindBinaryValue.text(key, session));
            }

            ByteBuffer buffer = row.getBytes("payload");
            return new BufferedInputStream(buffer);
        } catch (BinaryStoreException e) {
            throw e;
        } catch (RuntimeException e) {
            throw new BinaryStoreException(e);
        }
    }

    public  CassandraBinaryStore( String address );

}