Capacity() public method

public Capacity ( ) : int
return int
Beispiel #1
0
 public void Put(ByteBuffer buf)
 {
     Put(buf.buffer, buf.ArrayOffset(), buf.Capacity());
 }
		internal ByteBufferWindow(PackFile pack, long o, ByteBuffer b) : base(pack, o, b.
			Capacity())
		{
			buffer = b;
		}
Beispiel #3
0
 public static string OctetToListString(ByteBuffer oct)
 {
     int size = oct.Capacity();
     string hex = "0123456789ABCDEF";
     StringBuilder str = new StringBuilder(size * 3);
     for (int i = 0; i < size; i++)
     {
         byte b = oct.Get(i);
         str.Append(hex[(b >> 4) & unchecked((int)(0x0f))]);
         str.Append(hex[b & unchecked((int)(0x0f))]);
         if (i != (size - 1))
         {
             str.Append(' ');
         }
     }
     return str.ToString();
 }