Source/NFX.Erlang/ErlOutputStream.cs
/// <summary>
/// Write the low four bytes of a value to the stream in bif endian
/// order, at the specified position. If the position specified is
/// beyond the end of the stream, this method will have no effect
/// </summary>
/// <remarks>
/// Normally this method should be used in conjunction with
/// <see cref="Position"/>, when is is necessary to insert data into
/// the stream before it is known what the actual value should be.
/// For example:
///
/// <pre>
/// int pos = s.Position;
/// s.Write4BE(0); // make space for length data,
/// // but final value is not yet known
///
/// [ ...more write statements...]
///
/// // later... when we know the length value
/// s.Poke4BE(pos, length);
/// </pre>
/// </remarks>
Write the low four bytes of a value to the stream in bif endian
order, at the specified position. If the position specified is
beyond the end of the stream, this method will have no effect
Write the low four bytes of a value to the stream in bif endian order at the specified position . If the position specified is beyond the end of the stream this method will have no effect
public void Poke4BE(int offset, int n)
    {
      if (offset >= m_Position - 4)
        throw new ErlException(StringConsts.ERL_INVALID_VALUE_ERROR, offset);
      m_Buffer[offset + 0] = ((byte)((n & 0xff000000) >> 24));
      m_Buffer[offset + 1] = ((byte)((n & 0xff0000) >> 16));
      m_Buffer[offset + 2] = ((byte)((n & 0xff00) >> 8));
      m_Buffer[offset + 3] = ((byte)(n & 0xff));
    }
public void Poke4BE ( int offset , int n ) { if ( offset >= m_Position - 4 ) throw new ErlException ( StringConsts . ERL_INVALID_VALUE_ERROR , offset ) ; m_Buffer [ offset + 0 ] = ( ( byte ) ( ( n & 0xff000000 ) >> 24 ) ) ; m_Buffer [ offset + 1 ] = ( ( byte ) ( ( n & 0xff0000 ) >> 16 ) ) ; m_Buffer [ offset + 2 ] = ( ( byte ) ( ( n & 0xff00 ) >> 8 ) ) ; m_Buffer [ offset + 3 ] = ( ( byte ) ( n & 0xff ) ) ; }
Write the low four bytes of a value to the stream in bif endian
order, at the specified position.
Write the low four bytes of a value to the stream in bif endian order at the specified position .
offset
int
n
int
remarks
Normally this method should be used in conjunction with
, when is is necessary to insert data into
the stream before it is known what the actual value should be.
For example.

int pos = s.Position;
s.Write4BE(0); // make space for length data,
but final value is not yet known

[ ...more write statements...]

later... when we know the length value
s.Poke4BE(pos, length).
Normally this method should be used in conjunction with when is is necessary to insert data into the stream before it is known what the actual value should be . For example . int pos = s . Position ; s . Write4BE ( 0 ) ; // make space for length data but final value is not yet known [ ... more write statements ... ] later ... when we know the length value s . Poke4BE ( pos length ) .