Top "Bytebuffer" questions

A binary buffer with no specific encoding.

ByteBuffer getInt() question

We are using Java ByteBuffer for socket communication with a C++ server. We know Java is Big-endian and Socket communication …

java nio bytebuffer endianness
Getting string from netty ByteBuf

How can I get the string from a netty ByteBuf? As of now I am able to get it character …

java netty bytebuffer
Why the odd performance curve differential between ByteBuffer.allocate() and ByteBuffer.allocateDirect()

I'm working on some SocketChannel-to-SocketChannel code which will do best with a direct byte buffer--long lived and large (tens to …

java nio bytebuffer
Memory-Mapped MappedByteBuffer or Direct ByteBuffer for DB Implementation?

This looks like a long question because of all the context. There are 2 questions inside the novel below. Thank you …

java file-io database-design memory-mapped-files bytebuffer
Java ByteBuffer put vs wrap

What is the fastest way to fill up a pre-allocated ByteBuffer in Java? I first set the size of the …

java arrays performance bytebuffer
Fast erase (not clear) a ByteBuffer in Java

I am trying to "clean up" a ByteBuffer to be all zero bytes (all 0x00). I tried to loop over …

java bytebuffer erase
Options to make Java's ByteBuffer thread safe

What options do I have to make a ByteBuffer thread safe? It is known that it is not thread safe …

java thread-safety bytebuffer
Difference between ByteBuffer.allocateDirect() and MappedByteBuffer.load()

I was trying to implement a sort of shared cache between two or more JVMs by memory mapping a particular …

java unix memory nio bytebuffer
Efficient way to convert io.netty.buffer.ByteBuf to java.nio.ByteBuffer

I came across this query: Create a ByteBuf in Netty 4.0 about conversion from byte[] to ByteBuf and ByteBuffer to ByteBuf. …

java netty bytebuffer
How to serialize ByteBuffer

I wish to send a java.nio.ByteBuffer accross a network using RMI, however ByteBuffer isn't serializable. I've tried the …

java rmi bytebuffer