/* * 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 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(); }