예제 #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: private static Object readInternal(byte type, java.io.ObjectInput in) throws java.io.IOException, ClassNotFoundException
        private static Object ReadInternal(sbyte type, ObjectInput @in)
        {
            switch (type)
            {
            case DURATION_TYPE:
                return(Duration.ReadExternal(@in));

            case INSTANT_TYPE:
                return(Instant.ReadExternal(@in));

            case LOCAL_DATE_TYPE:
                return(LocalDate.ReadExternal(@in));

            case LOCAL_DATE_TIME_TYPE:
                return(LocalDateTime.ReadExternal(@in));

            case LOCAL_TIME_TYPE:
                return(LocalTime.ReadExternal(@in));

            case ZONE_DATE_TIME_TYPE:
                return(ZonedDateTime.ReadExternal(@in));

            case ZONE_OFFSET_TYPE:
                return(ZoneOffset.ReadExternal(@in));

            case ZONE_REGION_TYPE:
                return(ZoneRegion.ReadExternal(@in));

            case OFFSET_TIME_TYPE:
                return(OffsetTime.ReadExternal(@in));

            case OFFSET_DATE_TIME_TYPE:
                return(OffsetDateTime.ReadExternal(@in));

            case YEAR_TYPE:
                return(Year.ReadExternal(@in));

            case YEAR_MONTH_TYPE:
                return(YearMonth.ReadExternal(@in));

            case MONTH_DAY_TYPE:
                return(MonthDay.ReadExternal(@in));

            case PERIOD_TYPE:
                return(Period.ReadExternal(@in));

            default:
                throw new StreamCorruptedException("Unknown serialized type");
            }
        }