public static AttributedString readAttributedString(ObjectInputStream stream) { if (stream == null) { string str = "Null 'stream' argument."; Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new IllegalArgumentException(str); } else { AttributedString attributedString = (AttributedString) null; if (!stream.readBoolean()) { attributedString = new AttributedString((string) stream.readObject()); int num1 = (int) stream.readChar(); int num2 = 0; for (; num1 != (int) ushort.MaxValue; num1 = (int) stream.readChar()) { int num3 = stream.readInt(); Map map = (Map) stream.readObject(); attributedString.addAttributes(map, num2, num3); num2 = num3; } } return attributedString; } }