public static void writeAttributedString(AttributedString @as, ObjectOutputStream stream) { if (stream == null) { string str = "Null 'stream' argument."; Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new IllegalArgumentException(str); } else if (@as != null) { stream.writeBoolean(false); AttributedCharacterIterator iterator = @as.getIterator(); StringBuffer stringBuffer = new StringBuffer(); for (int index = (int) ((CharacterIterator) iterator).first(); index != (int) ushort.MaxValue; index = (int) ((CharacterIterator) iterator).next()) stringBuffer = stringBuffer.append((char) index); stream.writeObject((object) stringBuffer.toString()); int num = (int) ((CharacterIterator) iterator).first(); int beginIndex = ((CharacterIterator) iterator).getBeginIndex(); for (; num != (int) ushort.MaxValue; { int runLimit; num = (int) ((CharacterIterator) iterator).setIndex(runLimit); } ) { stream.writeChar(num); runLimit = iterator.getRunLimit(); stream.writeInt(runLimit - beginIndex); HashMap hashMap = new HashMap(iterator.getAttributes()); stream.writeObject((object) hashMap); } stream.writeChar((int) ushort.MaxValue); } else stream.writeBoolean(true); }