Concat two ByteBuffers in Java -
How can I collect two byte buffers in a bytebuffer?
The following does not work:
Bytebuffer BB = Bytebuffer.Olock (100); Bytebuff BB2 = Bitebuffer.Olocate (200); bb.allocate (200) .put (BB2); Println (bb.array () length.); The BB length is still 100 .
something like
BB = bytefuffer.overock (300). Put (BB) Input (BB2); should work: To make the content of both buffers, make a buffer, and then use the relative put-methods to fill the first and second buffers. (The put method returns the method on which the method was called)
Comments
Post a Comment