Top "Bytebuffer" questions

A binary buffer with no specific encoding.

How to convert a String array to a Byte array? (java)

I have a one dimensional String array that I want to convert into a one dimensional byte array. How do …

java bytearray converter bytebuffer arrays
Growing ByteBuffer

Has anyone has ever seen an implementation of java.nio.ByteBuffer that will grow dynamically if a putX() call overruns …

java bytebuffer
Determine number of Bytes in ByteBuffer

I have a ByteBuffer that can hold a maximum of (4 + size) bytes (that is, an integer followed by size characters). …

java size byte bytebuffer
How to garbage collect a direct buffer in Java

I have a memory leak that I have isolated to incorrectly disposed direct byte buffers. ByteBuffer buff = ByteBuffer.allocateDirect(7777777); The …

java memory-leaks buffer bytebuffer
java.nio.BufferUnderflowException while converting byte array to double

I need to convert a bytearray to double. I am using double dvalue = ByteBuffer.wrap(value).getDouble(); But at the …

java exception double bytearray bytebuffer
How to put data from an OutputStream into a ByteBuffer?

In Java I need to put content from an OutputStream (I fill data to that stream myself) into a ByteBuffer. …

java outputstream bytebuffer
Java InputStream to ByteBuffer

I am reading dds textures, but since once built the jar I can't access those textures through url and file …

java inputstream bytebuffer
How to initialize a ByteBuffer if you don't know how many bytes to allocate beforehand?

Is this: ByteBuffer buf = ByteBuffer.allocate(1000); ...the only way to initialize a ByteBuffer? What if I have no idea how …

java initialization bytebuffer
Deep copy duplicate() of Java's ByteBuffer

java.nio.ByteBuffer#duplicate() returns a new byte buffer that shares the old buffer's content. Changes to the old buffer's …

java nio deep-copy bytebuffer
C++ equivalent of Java ByteBuffer?

I'm looking for a C++ "equivalent" of Java ByteBuffer. I'm probably missing the obvious or just need an isolated usage …

java c++ bytebuffer