Ejemplo n.º 1
0
 public virtual ByteBuffer GetDataFragment(int index, ByteOrder byteOrder)
 {
     throw new NotSupportedException(ToString());
 }
Ejemplo n.º 2
0
 internal static ByteOrder Swap(ByteOrder from)
 {
     return from == ByteOrder.LittleEndian
                ? ByteOrder.BigEndian
                : ByteOrder.LittleEndian;
 }
Ejemplo n.º 3
0
 public ByteBuffer(int size, ByteOrder order)
     : base(size)
 {
     SetOrder(order);
 }
Ejemplo n.º 4
0
 public virtual ByteBuffer GetByteBuffer(ByteOrder byteOrder)
 {
     throw new NotSupportedException(ToString());
 }
Ejemplo n.º 5
0
 public ByteBuffer(byte[] buf, int offset, int size, ByteOrder order)
     : base(buf, offset, size)
 {
     SetOrder(order);
 }
Ejemplo n.º 6
0
 public ByteBuffer(byte[] buf, ByteOrder order)
     : base(buf)
 {
     SetOrder(order);
 }
Ejemplo n.º 7
0
        public ByteBuffer SetOrder(ByteOrder order)
        {
            _order = order;

            // Both reader and writer work on the same back store: MemoryStream
            if (order == ByteOrder.LittleEndian) {
                _reader = new BinaryReader(this);
                _writer = new BinaryWriter(this);
            }
            else {
                _reader = new BEBinaryReader(this);
                _writer = new BEBinaryWriter(this);
            }
            return this;
        }
Ejemplo n.º 8
0
 public static ByteBuffer Wrap(byte[] buf, int offset, int len, ByteOrder order)
 {
     return new ByteBuffer(buf, offset, len, order);
 }
Ejemplo n.º 9
0
 public static ByteBuffer Wrap(byte[] buf, ByteOrder order)
 {
     return new ByteBuffer(buf, order);
 }