You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need these methods, as I am trying to read from a Persistent Socket connection which transfers byte[].
And now for reading a float I have to write float val = ByteBuffer.wrap(data.readByteArray(4)).order(ByteOrder.LITTLE_ENDIAN).getFloat()
which at the least is a lot of code instead of data.readFloatLe()
and as per my understanding involves multiple copying of byte[] (memory allocation stuff), which is what I was trying to avoid by using OKIO
The text was updated successfully, but these errors were encountered:
I need these methods, as I am trying to read from a Persistent Socket
connection which transfers byte[].
And now for reading a float I have to write
float val =
ByteBuffer.wrap(data.readByteArray(4)).order(ByteOrder.LITTLE_ENDIAN).getFloat()
which at the least is a lot of code instead of data.readFloatLe()
and as per my understanding involves multiple copying of byte[] (memory
allocation stuff), which is what I was trying to avoid by using OKIO
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub #202
It would be great if BufferedSource & BufferedSink would have methods for reading and writing float & doubles as
float readFloat()
float readFloatLe()
double readDouble()
double readDoubleLe()
writeFloat(float v)
writeFloatLe(float v)
writeDouble(double v)
writeDoubleLe(float v)
I need these methods, as I am trying to read from a Persistent Socket connection which transfers byte[].
And now for reading a float I have to write
float val = ByteBuffer.wrap(data.readByteArray(4)).order(ByteOrder.LITTLE_ENDIAN).getFloat()
which at the least is a lot of code instead of
data.readFloatLe()
and as per my understanding involves multiple copying of byte[] (memory allocation stuff), which is what I was trying to avoid by using OKIO
The text was updated successfully, but these errors were encountered: