bytebuffer
How can I increase performance on reading the InputStream?
This very well may just be a KISS moment, but I feel like I should ask anyway. I have a thread and it\'s reading from a sockets InputStream. Since I am dealing in particularly small data sizes (as in[详细]
2023-03-16 19:25 分类:问答How to write/read the direct ByteBuffer in the native?
I want to receive data from a socket in native part and then read the data in the Java code. I know that the direct ByteBuffer might be a good choice. So I prepare a ByteBuffer in the Java something l[详细]
2023-03-15 10:02 分类:问答Android asynchronous USB reads to ByteBuffer, but cannot determine size
I am reading bytes from an FTDI-based USB device on the Android 3.1 OS (on a Motorola Xoom) using the recently-added USB API for Android: http://developer.android.com/guide/topics/usb/host.html[详细]
2023-03-13 12:12 分类:问答Java ByteBuffer issues with signed and unsigned types converting byte array to integer
I expected this: ByteBuffer.wrap(开发者_如何学JAVAnew byte[] { 0, 0, 0, -34 }).getInt() == 222 However the following is true:[详细]
2023-03-13 03:17 分类:问答How to use java.nio.channels.FileChannel to read to ByteBuffer achieve similiar behavior like BufferedReader#readLine()
I want to use java.nio.channels.FileChannel to read from a file, but I want to read line per line like BufferedReader#readLine() does. The reason why I need to use java.nio.channels.FileChannel instea[详细]
2023-03-12 16:28 分类:问答Efficiency problem of writing large messages with different header to multiple receivers
开发者_Go百科There is a string (message body) and 3 different headers to be sent to 3 users using java nio socket.[详细]
2023-03-10 05:49 分类:问答java nio and ByteBuffer problem
I met a problem. I use nio socket to receive 开发者_如何学Pythonmessage. Upon a complete message is received, I send the dataBuffer which holds the received message to another user. But there is excep[详细]
2023-03-10 00:29 分类:问答Is there similar java ByteBuffer function to pointer function in C
I am using ByteBuffer to transfer data with java nio. A same message can be sent to multiple receivers. The message format is \"message header + message content\". A staright way is to allocate a new[详细]
2023-03-09 15:14 分类:问答java memcopy DirectBuffer
Hi I am working with direct buffers in Java, and I need to have a fast memcopy on them. In C there is the memcpy command, and on Java Arrays I have Arrays.copyOf. But there is no way of using Arrays i[详细]
2023-03-09 03:00 分类:问答Android ByteBuffer.asXxxBuffer ignores position?
I\'m trying to read a memory-mapped file containing vertices and elements for rendering in OpenGL. The file loads correctly into an iPhone app, but I just can\'t get my head around how to do the same[详细]
2023-03-03 22:18 分类:问答