public ByteBuffer( int size, ByteOrder order ) : base(size) { SetOrder ( order ); }
public static ByteBuffer Wrap( byte[] buf, ByteOrder order ) { return new ByteBuffer ( buf, order ); }
public ByteBuffer SetOrder( ByteOrder order ) { this.order = order; // Both reader and writer work on the same back store: MemoryStream if ( order == ByteOrder.LITTLE_ENDIAN ) { reader = new BinaryReader ( this ); writer = new BinaryWriter ( this ); } else { reader = new BEBinaryReader ( this ); writer = new BEBinaryWriter ( this ); } return this; }
/////////////////////////////////////////////////////////////////////// /// Constructor /////////////////////////////////////////////////////////////////////// //private ByteBuffer( byte[] buf ) : this( buf, ByteOrder.LITTLE_ENDIAN ) //{ //} public ByteBuffer( byte[] buf, ByteOrder order ) : base(buf) { SetOrder ( order ); }
public static ByteBuffer Wrap( byte[] buf, int offset, int len, ByteOrder order ) { byte[] newBuf = new byte[len]; Array.Copy ( buf, offset, newBuf, 0, len ); return new ByteBuffer ( newBuf, order ); }
public ByteBuffer(int size, ByteOrder order) : base(size) { SetOrder(order); }
/////////////////////////////////////////////////////////////////////// /// Constructor /////////////////////////////////////////////////////////////////////// //private ByteBuffer( byte[] buf ) : this( buf, ByteOrder.LITTLE_ENDIAN ) //{ //} public ByteBuffer(byte[] buf, ByteOrder order) : base(buf) { SetOrder(order); }
public static ByteBuffer Wrap(byte[] buf, int offset, int len, ByteOrder order) { byte[] newBuf = new byte[len]; Array.Copy(buf, offset, newBuf, 0, len); return(new ByteBuffer(newBuf, order)); }
public static ByteBuffer Wrap(byte[] buf, ByteOrder order) { return(new ByteBuffer(buf, order)); }