Exemplo n.º 1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: static HijrahDate readExternal(java.io.ObjectInput in) throws java.io.IOException, ClassNotFoundException
        internal static HijrahDate ReadExternal(ObjectInput @in)
        {
            HijrahChronology ChronoLocalDate_Fields.Chrono = (HijrahChronology)@in.ReadObject();
            int year       = @in.ReadInt();
            int month      = @in.ReadByte();
            int dayOfMonth = @in.ReadByte();

            return(ChronoLocalDate_Fields.Chrono.Date(year, month, dayOfMonth));
        }
Exemplo n.º 2
0
        /// <summary>
        /// The object implements the readExternal method to restore its
        /// contents by calling the methods of DataInput for primitive
        /// types and readObject for objects, strings and arrays.  The
        /// readExternal method must read the values in the same sequence
        /// and with the same types as were written by writeExternal. </summary>
        /// <exception cref="ClassNotFoundException"> If the class for an object being
        ///              restored cannot be found. </exception>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void readExternal(java.io.ObjectInput in) throws java.io.IOException, ClassNotFoundException
        public virtual void ReadExternal(ObjectInput @in)
        {
            String s = @in.ReadUTF();

            if (s == null || s.Length() == 0)             // long mime type
            {
                sbyte[] ba = new sbyte[@in.ReadInt()];
                @in.ReadFully(ba);
                s = StringHelperClass.NewString(ba);
            }
            try
            {
                Parse(s);
            }
            catch (MimeTypeParseException e)
            {
                throw new IOException(e.ToString());
            }
        }