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

asp.net - Procedure or function "Procedure name" expects a parameter "Param name" which was not supplied occurs rarely -

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

sql server ce - Is there some way to make sqlce3.5 and 4.0 co-exist in the C# project -