Use a byte array for writing

This way we can also write something other then a String

Writing is limited to 2GB at once, since array in Java are 32-bit
When reading, read bytes instead of Strings

This is an API change, but since the bindings are fairly new I thought
we could still do this. Since reading bytes is also better.
When writing with RBD, use Integers instead of Long

Also return the number of bytes written instead of void

Java doesn't support 64-bit arrays, so everything has to be
done in 32-bit arrays.