Java Output: 1397566791 C# Output: 1194151251 I have no idea how to get the same output Thanks Answer Well, Int32 consists of 4 bytes only, let’s Take them with the help of Take(4). Next, we have to take ending (Big or Little) into account and Reverse these 4 bytes if necessary:
Tag: bytebuffer
Growing ByteBuffer
Has anyone has ever seen an implementation of java.nio.ByteBuffer that will grow dynamically if a putX() call overruns the capacity? The reason I want to do it this way is twofold: I don’t know how much space I need ahead of time. I’d rather not do a new ByteBuffer.allocate() then a bulk put() every time I run out of space.