コード例 #1
0
 // write an NERClassifierCombiner to an ObjectOutputStream
 public override void SerializeClassifier(ObjectOutputStream oos)
 {
     try
     {
         // first write the ClassifierCombiner part to disk
         base.SerializeClassifier(oos);
         // write whether to use SUTime
         oos.WriteBoolean(useSUTime);
         // write whether to use NumericClassifiers
         oos.WriteBoolean(applyNumericClassifiers);
     }
     catch (IOException e)
     {
         throw new RuntimeIOException(e);
     }
 }
コード例 #2
0
 /// <exception cref="System.IO.IOException"></exception>
 private void WriteObject(ObjectOutputStream @out)
 {
     @out.WriteObject(cookie.GetName());
     @out.WriteObject(cookie.GetValue());
     @out.WriteObject(cookie.GetComment());
     @out.WriteObject(cookie.GetDomain());
     @out.WriteObject(cookie.GetExpiryDate());
     @out.WriteObject(cookie.GetPath());
     @out.WriteInt(cookie.GetVersion());
     @out.WriteBoolean(cookie.IsSecure());
 }
コード例 #3
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);
            }
        }