Top "Bytebuffer" questions

A binary buffer with no specific encoding.

Byte array to image conversion

I want to convert a byte array to an image. This is my database code from where I get the …

c# arrays byte bytebuffer
converting Java bitmap to byte array

Bitmap bmp = intent.getExtras().get("data"); int size = bmp.getRowBytes() * bmp.getHeight(); ByteBuffer b = ByteBuffer.allocate(size); bmp.copyPixelsToBuffer(b); …

java android serialization bitmap bytebuffer
What is the use of ByteBuffer in Java?

What are example applications for a ByteBuffer in Java? Please list any example scenarios where this is used. Thank you!

java buffer bytebuffer
Java: Converting String to and from ByteBuffer and associated problems

I am using Java NIO for my socket connections, and my protocol is text based, so I need to be …

java string character-encoding nio bytebuffer
Gets byte array from a ByteBuffer in java

Is this the recommended way to get the bytes from the ByteBuffer ByteBuffer bb =.. byte[] b = new byte[bb.remaining()] …

java arrays bytearray nio bytebuffer
How to create ByteArrayInputStream from a file in Java?

I have a file that can be any thing like ZIP, RAR, txt, CSV, doc etc. I would like to …

java arrays bytebuffer bytearrayinputstream
ByteBuffer.allocate() vs. ByteBuffer.allocateDirect()

To allocate() or to allocateDirect(), that is the question. For some years now I've just stuck to the thought that …

java performance nio bytebuffer
Convert ByteBuffer to byte array java

Does anyone know how to convert ByteBuffer to byte[] array? I need to get byte array from my ByteBuffer. When …

java arrays bytebuffer
Wrapping a ByteBuffer with an InputStream

I have a method that takes an InputStream and reads data from it. I would like to use this method …

java nio inputstream bytebuffer
What is the purpose of ByteBuffer's flip method? (And why is it called "flip"?)

Why does ByteBuffer's flip() method called "flip"? What is "flipped" here? According to apidoc, two successive flips won't restore original …

java flip bytebuffer