Skip to main content
3 votes
1 answer
226 views

I'm working on legacy code that uses mmap to load data from a file: int fd; std::size_t fs; fd = open(filename, O_RDONLY); // error management omitted for the example fs = get_size_from_fd(fd); // ...
Oersted's user avatar
  • 3,834
2 votes
0 answers
73 views

My use case is the following: reading DirectByteBuffers from the network and decoding them into UTF-8 strings. I’ve observed that using a UTF_8 CharsetDecoder with a DirectByteBuffer is 3–4 times ...
Artem Golovko's user avatar
0 votes
0 answers
160 views

I have been writing a VoIP program and have used the code below to encrypt some data for sending in Java: private byte[] encryptData(byte[] data){ ByteBuffer unwrapEncrypt = ByteBuffer.allocate(...
sunny's user avatar
  • 11
0 votes
0 answers
65 views

Calling SSLEngine.unwrap(srcBB, dstBB) may alter the source ByteBuffer (scrBB) unexpectedly. As I was examining the source bytes consumed, I rely on srcBB to have its position advanced. It generally ...
user2023577's user avatar
  • 2,161
0 votes
0 answers
52 views

I'm currently migrating the application code from java 8 to java 11, previously we use the internal class "sun.misc.Cleaner" and now when my application run I got a java.lang....
Etienne's user avatar
  • 25
0 votes
1 answer
51 views

Had a question about buffer management for Netty downstream buffer sending flow. I have a Netty SimpleChannelInBoundHandler MainHandler that does 2 things:- Receives buffer and asynchronously creates ...
vjm's user avatar
  • 9
1 vote
3 answers
79 views

Recently I encountered a bug in non-aligned byte access, so I did an experiment and encountered some doubts, as follows: Why does the system not crash when my code below accesses non-aligned bytes? ...
kanghao chen's user avatar
0 votes
1 answer
94 views

I am using ByteToMessageDecoder decode(ChannelHandlerContext ctx, ByteBuf bytebuf, List<Object> out) { ... } I want to perform some validation on incoming bytebuffer and then send bytebuf....
abhish_gl's user avatar
  • 400
0 votes
0 answers
111 views

I wanted use ByteBuffer.allocateDirect to keep data on native memory but it looks like it keeps data on heap. I used this code to check that DirectByteBuffer keeps data on heap. import android.util....
Денис Рязанцев's user avatar
0 votes
1 answer
407 views

I try to use some JS library with ServiceWorker, without access to Node.JS FileSystem functionality. That original library export result in the same way Import * as fs from 'fs' ... JsLib.export(...
Viacheslav's user avatar
  • 1,332
0 votes
1 answer
88 views

public class CodingDecoding { public static void main(String[] args) { try ( FileChannel out = FileChannel.open(Paths.get("out.txt"), ...
wydra__'s user avatar
  • 13
0 votes
2 answers
85 views

this might be a difficult question, but I'm trying to do the following: Take an input string i which i want to be a unix timestamp including miliseconds Convert this to an int64 byte array, but i can ...
Khasar1's user avatar
0 votes
0 answers
132 views

I am totally confused, what are the Kotlin equivalents of Pythons... bytes - UByteArray yes I know BytesIO - a byte steam for reading (and later writing) bytes struct module - for conversion between ...
ArekBulski's user avatar
  • 5,218
0 votes
1 answer
221 views

I have a java program, where I m trying to convert a byte array to short. byte arr[] = {-1,-1}; int value = ByteBuffer.wrap(arr).order(ByteOrder.LITTLE_ENDIAN).getShort(); the value I get from above ...
Abhinav Singh's user avatar
0 votes
0 answers
246 views

My flutter app need to send data type bytebuffer from client to sever via websocket. But web_socket_channel is not support send data type bytebuffer or number. Are there any library support send ...
Bình Nguyễn Bá's user avatar

15 30 50 per page
1
2 3 4 5
62