示例#1
0
        /// <summary>
        /// Constructs and returns a new <code>ObjID</code> instance by
        /// unmarshalling a binary representation from an
        /// <code>ObjectInput</code> instance.
        ///
        /// <para>Specifically, this method first invokes the given stream's
        /// <seealso cref="ObjectInput#readLong()"/> method to read an object number,
        /// then it invokes <seealso cref="UID#read(DataInput)"/> with the
        /// stream to read an address space identifier, and then it
        /// creates and returns a new <code>ObjID</code> instance that
        /// contains the object number and address space identifier that
        /// were read from the stream.
        ///
        /// </para>
        /// </summary>
        /// <param name="in"> the <code>ObjectInput</code> instance to read
        /// <code>ObjID</code> from
        /// </param>
        /// <returns>  unmarshalled <code>ObjID</code> instance
        /// </returns>
        /// <exception cref="IOException"> if an I/O error occurs while performing
        /// this operation </exception>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public static ObjID read(java.io.ObjectInput in) throws java.io.IOException
        public static ObjID Read(ObjectInput @in)
        {
            long num   = @in.ReadLong();
            UID  space = UID.Read(@in);

            return(new ObjID(num, space));
        }