예제 #1
0
        /// <summary>
        /// Writes the state to the stream.
        /// </summary>
        /// <param name="out">  the output stream, not null </param>
        /// <exception cref="IOException"> if an error occurs </exception>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: void writeExternal(java.io.DataOutput out) throws java.io.IOException
        internal void WriteExternal(DataOutput @out)
        {
            @out.WriteInt(StandardTransitions.Length);
            foreach (long trans in StandardTransitions)
            {
                Ser.WriteEpochSec(trans, @out);
            }
            foreach (ZoneOffset offset in StandardOffsets)
            {
                Ser.WriteOffset(offset, @out);
            }
            @out.WriteInt(SavingsInstantTransitions.Length);
            foreach (long trans in SavingsInstantTransitions)
            {
                Ser.WriteEpochSec(trans, @out);
            }
            foreach (ZoneOffset offset in WallOffsets)
            {
                Ser.WriteOffset(offset, @out);
            }
            @out.WriteByte(LastRules.Length);
            foreach (ZoneOffsetTransitionRule rule in LastRules)
            {
                rule.WriteExternal(@out);
            }
        }
예제 #2
0
        /// <summary>
        /// Writes the state to the stream.
        /// </summary>
        /// <param name="out">  the output stream, not null </param>
        /// <exception cref="IOException"> if an error occurs </exception>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: void writeExternal(java.io.DataOutput out) throws java.io.IOException
        internal void WriteExternal(DataOutput @out)
        {
            Ser.WriteEpochSec(ToEpochSecond(), @out);
            Ser.WriteOffset(OffsetBefore_Renamed, @out);
            Ser.WriteOffset(OffsetAfter_Renamed, @out);
        }