示例#1
0
 /// <exception cref="System.IO.IOException"></exception>
 private void writeObject(java.io.ObjectOutputStream @out)
 {
     lock (this)
     {
         java.io.ObjectOutputStream.PutField fields = @out.putFields();
         fields.put("count", Length);
         fields.put("shared", false);
         fields.put("value", getValue());
         @out.writeFields();
     }
 }
示例#2
0
        internal static void writeObject(Exception x, ObjectOutputStream s)
        {
#if !FIRST_PASS
            lock (x)
            {
                ObjectOutputStream.PutField fields = s.putFields();
                fields.put("detailMessage", Throwable.instancehelper_getMessage(x));
                Exception cause = Throwable.instancehelper_getCause(x);
                if (cause == null && x is Throwable)
                {
                    cause = ((Throwable)x).cause;
                }
                fields.put("cause", cause);
                fields.put("stackTrace", Throwable.instancehelper_getStackTrace(x));
                s.writeFields();
            }
#endif
        }