private string ReadString4() { int len = 0; len = ByteConverter.ReverseEndian(reader.ReadInt32()); if (len > TarsStruct.TARS_MAX_STRING_LENGTH || len < 0) { throw new TarsDecodeException("string too long: " + len); } byte[] ss = new byte[len]; ss = reader.ReadBytes(len); return(ByteConverter.Bytes2String(ss)); }
private string ReadString1() { int len = 0; len = reader.ReadByte(); if (len < 0) { len += 256; } byte[] ss = new byte[len]; ss = reader.ReadBytes(len); return(ByteConverter.Bytes2String(ss)); }