ArrayOffset() публичный Метод

public ArrayOffset ( ) : int
Результат int
Пример #1
0
		public int Read (ByteBuffer buffer)
		{
			int offset = buffer.Position () + buffer.ArrayOffset ();
			int num2 = s.Read (buffer.Array (), offset, (buffer.Limit () + buffer.ArrayOffset ()) - offset);
			buffer.Position (buffer.Position () + num2);
			return num2;
		}
Пример #2
0
		public int Write (ByteBuffer buffer)
		{
			int offset = buffer.Position () + buffer.ArrayOffset ();
			int count = (buffer.Limit () + buffer.ArrayOffset ()) - offset;
			s.Write (buffer.Array (), offset, count);
			buffer.Position (buffer.Position () + count);
			return count;
		}
Пример #3
0
        public int Read(ByteBuffer buffer)
        {
            int offset = buffer.Position() + buffer.ArrayOffset();
            int num2   = s.Read(buffer.Array(), offset, (buffer.Limit() + buffer.ArrayOffset()) - offset);

            buffer.Position(buffer.Position() + num2);
            return(num2);
        }
Пример #4
0
        public int Write(ByteBuffer buffer)
        {
            int offset = buffer.Position() + buffer.ArrayOffset();
            int count  = (buffer.Limit() + buffer.ArrayOffset()) - offset;

            s.Write(buffer.Array(), offset, count);
            buffer.Position(buffer.Position() + count);
            return(count);
        }
Пример #5
0
 public static string Decode(this Encoding e, ByteBuffer buffer)
 {
     return(e.Decode(buffer.Array(), buffer.ArrayOffset() + buffer.Position(), buffer.Limit() - buffer.Position()));
 }
Пример #6
0
 public void Put(ByteBuffer buf)
 {
     Put(buf.buffer, buf.ArrayOffset(), buf.Capacity());
 }