/// <exception cref="System.IO.IOException"/> public virtual void Write(BinaryWriter writer) { if (this.value == null) { @out.WriteInt(-1); WritableUtils.WriteString(@out, this._elementType.FullName); } else { object[] array = Collections.ToArray(this.value); int length = array.Length; @out.WriteInt(length); if (length == 0) { if (this._elementType == null) { throw new NotSupportedException("Unable to serialize empty EnumSet with no element type provided." ); } WritableUtils.WriteString(@out, this._elementType.FullName); } for (int i = 0; i < length; i++) { ObjectWritable.WriteObject(@out, array[i], array[i].GetType(), _conf); } } }
/// <exception cref="System.IO.IOException"/> public virtual void Write(BinaryWriter writer) { @out.WriteLong(rpcVersion); UTF8.WriteString(@out, declaringClassProtocolName); UTF8.WriteString(@out, methodName); @out.WriteLong(clientVersion); @out.WriteInt(clientMethodsHash); @out.WriteInt(parameterClasses.Length); for (int i = 0; i < parameterClasses.Length; i++) { ObjectWritable.WriteObject(@out, parameters[i], parameterClasses[i], conf, true); } }