79718910

Date: 2025-07-29 16:06:38
Score: 1.5
Natty:
Report link

If you are working with Java 21 you could use the Foreign API.

public static ByteBuffer asByteBuffer(Buffer buf) {
    return MemorySegment.ofBuffer(buf).asByteBuffer();
}
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Ciro Diaz