Example #1
0
 public static ByteBuffer FromBuffer(byte[] data)
 {
     ByteBuffer buffer = new ByteBuffer();
     buffer._buffer = data;
     buffer._capacity = buffer.Length = data.Length;
     return buffer;
 }
Example #2
0
 public static ByteBuffer WithCapactiy(int capacity)
 {
     ByteBuffer buffer = new ByteBuffer();
     buffer._buffer = new byte[capacity];
     buffer._capacity = capacity;
     return buffer;
 }