/// <summary> /// Writes this object out to a stream (i.e., serializes it). /// /// @serialData An initial {@code String} denoting the /// {@code type} is followed by a {@code String} denoting the /// {@code name} is followed by a {@code String} denoting the /// {@code actions} is followed by an {@code int} indicating the /// number of certificates to follow /// (a value of "zero" denotes that there are no certificates associated /// with this object). /// Each certificate is written out starting with a {@code String} /// denoting the certificate type, followed by an /// {@code int} specifying the length of the certificate encoding, /// followed by the certificate encoding itself which is written out as an /// array of 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(java.io.ObjectOutputStream oos) { oos.DefaultWriteObject(); if (Certs == null || Certs.Length == 0) { oos.WriteInt(0); } else { // write out the total number of certs oos.WriteInt(Certs.Length); // write out each cert, including its type for (int i = 0; i < Certs.Length; i++) { java.security.cert.Certificate cert = Certs[i]; try { oos.WriteUTF(cert.Type); sbyte[] encoded = cert.Encoded; oos.WriteInt(encoded.Length); oos.Write(encoded); } catch (CertificateEncodingException cee) { throw new IOException(cee.Message); } } } }
/// <summary> /// Save the state of the {@code StringBuilder} instance to a stream /// (that is, serialize it). /// /// @serialData the number of characters currently stored in the string /// builder ({@code int}), followed by the characters in the /// string builder ({@code char[]}). The length of the /// {@code char} array may be greater than the number of /// characters currently stored in the string builder, in which /// case extra characters are ignored. /// </summary> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException private void WriteObject(java.io.ObjectOutputStream s) { s.DefaultWriteObject(); s.WriteInt(Count); s.WriteObject(Value_Renamed); }