/// <exception cref="System.IO.IOException"/> public virtual void ReadFields(BinaryReader reader) { int length = @in.ReadInt(); if (length == -1) { this.value = null; } else { if (length == 0) { this._elementType = (Type)ObjectWritable.LoadClass(_conf, WritableUtils.ReadString( @in)); this.value = EnumSet.NoneOf(this._elementType); } else { E first = (E)ObjectWritable.ReadObject(@in, _conf); this.value = (EnumSet <E>)EnumSet.Of(first); for (int i = 1; i < length; i++) { this.value.AddItem((E)ObjectWritable.ReadObject(@in, _conf)); } } } }
/// <exception cref="System.IO.IOException"/> public virtual void ReadFields(BinaryReader reader) { rpcVersion = @in.ReadLong(); declaringClassProtocolName = UTF8.ReadString(@in); methodName = UTF8.ReadString(@in); clientVersion = @in.ReadLong(); clientMethodsHash = @in.ReadInt(); parameters = new object[@in.ReadInt()]; parameterClasses = new Type[parameters.Length]; ObjectWritable objectWritable = new ObjectWritable(); for (int i = 0; i < parameters.Length; i++) { parameters[i] = ObjectWritable.ReadObject(@in, objectWritable, this.conf); parameterClasses[i] = objectWritable.GetDeclaredClass(); } }