Questions tagged [bytebuffer]

A binary buffer with no specific encoding. Use this tag only if you're having specific problems in relation with byte buffers

A binary buffer with no specific encoding.

Examples include byte[] in Java, char[] or uint8_t[] in C++. Objects like std::wstring_t that have a specific encoding (like UTF-8) assigned to them are no byte buffers.

Use this tag only if you're having specific problems in relation with byte buffers. Do not use this tag if there is no indication that the byte buffer you are using has any relation to the problem you're asking about.

919 questions
-3
votes
2 answers

Printing out bytes of a byte buffer to console output stream in hexadecimal notation (0xABCDEF)

I know there are a lot of questions about this topic but I think a couldn't find the right keywords so I'm asking. I want to print out bytes of a byte buffer to console output in hexadecimal notation (0xABCDEF) but i don't know what is the byte…
someWhereElse
  • 15
  • 2
  • 6
-4
votes
2 answers

Comparing bytes in a ByteBuffer

I have a byte array in Java of size 4, which I am trying to put the first two bytes of into ByteBuffer. Here is how I am doing it: byte[] array = new byte[4]; ByteBuffer buff = ByteBuffer.allocate(2); buff.put(array, 0, 2); What's wrong with my…
darksky
  • 20,411
  • 61
  • 165
  • 254
-4
votes
1 answer

Bytebuffer output Android Java

i want to display the first 4 characters of my dummy data. How do i do that? I want as output : outputvalue = $* outputvalue = 22 protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); …
-4
votes
3 answers

C# version of 2 Java methods with ByteBuffer

I am new in C# and I will really appreciate some help about 2 Java methods I need to implement in C# public static String getTerminatedString(ByteBuffer buf) { return new String(getTerminatedArray(buf)); } public static…
Borislav
  • 21
  • 3
1 2 3
61
62