Example #1
0
        /// <summary>
        /// Serialize this {@code CertificateRevokedException} instance.
        ///
        /// @serialData the size of the extensions map (int), followed by all of
        /// the extensions in the map, in no particular order. For each extension,
        /// the following data is emitted: the OID String (Object), the criticality
        /// flag (boolean), the length of the encoded extension value byte array
        /// (int), and the encoded extension value bytes.
        /// </summary>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: private void writeObject(java.io.ObjectOutputStream oos) throws java.io.IOException
        private void WriteObject(ObjectOutputStream oos)
        {
            // Write out the non-transient fields
            // (revocationDate, reason, authority)
            oos.DefaultWriteObject();

            // Write out the size (number of mappings) of the extensions map
            oos.WriteInt(Extensions_Renamed.Count);

            // For each extension in the map, the following are emitted (in order):
            // the OID String (Object), the criticality flag (boolean), the length
            // of the encoded extension value byte array (int), and the encoded
            // extension value byte array. The extensions themselves are emitted
            // in no particular order.
            foreach (java.util.Map_Entry <String, Extension> entry in Extensions_Renamed)
            {
                Extension ext = entry.Value;
                oos.WriteObject(ext.Id);
                oos.WriteBoolean(ext.Critical);
                sbyte[] extVal = ext.Value;
                oos.WriteInt(extVal.Length);
                oos.Write(extVal);
            }
        }
 /// <exception cref="System.IO.IOException"/>
 private void WriteObject(ObjectOutputStream @out)
 {
     byte[] serialized = metadata.Serialize();
     @out.WriteInt(serialized.Length);
     @out.Write(serialized);
 }