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

c# - The item with identity 'Id' already exists in the metadata collection. Parameter name: item -

sql - PostgreSQL automatically update row at specific date -

jsp - No mapping found for HTTP request with URI with annotation config Spring MVC and Jetty -