Top "Byte" questions

A unit of information usually corresponding to 8 bits.

Java- Convert bufferedimage to byte[] without writing to disk

I'm trying to send multiple images over a socket using java but I need a faster way to convert the …

java byte bufferedimage
Request returns bytes and I'm failing to decode them

Essentially I made a request to a website and got a byte response back: b'[{"geonameId:"703448"}..........'. I'm confused because …

python json byte python-requests decoding
How do you set only certain bits of a byte in C without affecting the rest?

Say I have a byte like this 1010XXXX where the X values could be anything. I want to set the …

c byte bitmask
How can I invert bits of an unsigned byte in Java?

I am trying to write a decoder for a very simple type of encryption. Numbers from 0-255 are entered via …

java byte unsigned bits complement
BigInteger to byte[]

I need to convert a Java BigInteger instance to its value in bytes. From the API, I get this method …

java byte biginteger
Android byte[] to image in Camera.onPreviewFrame

When trying to convert the byte[] of Camera.onPreviewFrame to Bitamp using BitmapFactory.decodeByteArray gives me an error SkImageDecoder::Factory …

android image byte decoding
java string.getBytes("UTF-8") javascript equivalent

I have this string in java: "test.message" byte[] bytes = plaintext.getBytes("UTF-8"); //result: [116, 101, 115, 116, 46, 109, 101, 115, 115, 97, 103, 101] If I do the same thing …

java javascript utf-8 byte utf-16
Ruby: create a String from bytes

I would like to build a string from a byte value. I currently use: str = " " str[0] = byte This seems to …

ruby string byte
Python Comparison of byte literals

The following question arose because I was trying to use bytes strings as dictionary keys and bytes values that I …

python comparison byte endianness base
When to use byte array & when byte buffer?

What is the difference between a byte array & byte buffer ? Also, in what situations should one be preferred over …

java byte bytearray buffer