Adds copy implementations for reading/writing ByteBuffers.