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

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -