/* * Convert this tuple to the equivalent Erlang external representation. * * @param buf an output stream to which the encoded tuple should be * written. **/ public override void encode(OtpOutputStream buf) { int arity = (int)(elems.Length); buf.write_tuple_head(arity); for (int i = 0; i < arity; i++) { buf.write_any(elems[i]); } }
/* * Convert this list to the equivalent Erlang external * representation. Note that this method never encodes lists as * strings, even when it is possible to do so. * * @param buf An output stream to which the encoded list should be * written. * **/ public override void encode(OtpOutputStream buf) { int _arity = arity(); if (_arity > 0) { buf.write_list_head(_arity); for (int i = 0; i < _arity; i++) { buf.write_any(elems[i]); } } buf.write_nil(); }
/* * Convert this tuple to the equivalent Erlang external representation. * * @param buf an output stream to which the encoded tuple should be * written. **/ public override void encode(OtpOutputStream buf) { int arity = (int) (elems.Length); buf.write_tuple_head(arity); for (int i = 0; i < arity; i++) { buf.write_any(elems[i]); } }