Use allocate instead of allocateDirect for Writer buffer

Closes Miners/minus-for-Android#2105

Apparently the S2 doesn't allocate a buffer from which we can
get a byte[] for writing into the OutputStream