Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
3 votes
1 answer
232 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); // ...
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 ...
0 votes
0 answers
161 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(...
0 votes
0 answers
67 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 ...
0 votes
0 answers
54 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....
0 votes
1 answer
54 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 ...
1 vote
3 answers
83 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? ...
0 votes
1 answer
96 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....
0 votes
0 answers
123 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....
0 votes
1 answer
422 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(...
0 votes
1 answer
91 views

public class CodingDecoding { public static void main(String[] args) { try ( FileChannel out = FileChannel.open(Paths.get("out.txt"), ...
0 votes
2 answers
86 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 ...
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 ...
0 votes
1 answer
226 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 ...
0 votes
0 answers
250 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 ...

15 30 50 per page
1
2 3 4 5
...
62

AltStyle によって変換されたページ (->オリジナル) /