/** * Add entry synchronously to an open ledger. * * @param entryId entryId to be added. * @param data array of bytes to be written * @return same value of param {@code entryId}. */ default long write(final long entryId, final byte[] data) throws BKException, InterruptedException { return write(entryId, Unpooled.wrappedBuffer(data)); }
/** * Add entry synchronously to an open ledger. * * @param entryId entryId to be added * @param data array of bytes to be written * @return the same value of param entryId. */ default long write(final long entryId, final ByteBuffer data) throws BKException, InterruptedException { return write(entryId, Unpooled.wrappedBuffer(data)); }
/** * Add entry synchronously to an open ledger. * * @param entryId entryId to be added. * @param data array of bytes to be written * @param offset the offset of the bytes array * @param length the length to data to write * @return the same value of param {@code entryId}. */ default long write(final long entryId, final byte[] data, int offset, int length) throws BKException, InterruptedException { return write(entryId, Unpooled.wrappedBuffer(data, offset, length)); }