package o; import java.io.Externalizable; import java.io.IOException; import java.io.InvalidClassException; import java.io.ObjectInput; import java.io.ObjectOutput; import java.io.StreamCorruptedException; /* renamed from: o.gti, reason: case insensitive filesystem */ /* loaded from: classes6.dex */ final class C15548gti implements Externalizable { static final byte CHRONO_LOCALDATETIME_TYPE = 12; static final byte CHRONO_TYPE = 11; static final byte CHRONO_ZONEDDATETIME_TYPE = 13; static final byte HIJRAH_DATE_TYPE = 3; static final byte HIJRAH_ERA_TYPE = 4; static final byte JAPANESE_DATE_TYPE = 1; static final byte JAPANESE_ERA_TYPE = 2; static final byte MINGUO_DATE_TYPE = 5; static final byte MINGUO_ERA_TYPE = 6; static final byte THAIBUDDHIST_DATE_TYPE = 7; static final byte THAIBUDDHIST_ERA_TYPE = 8; private static final long serialVersionUID = 7857518227608961174L; private Object object; private byte type; public C15548gti() { } /* JADX INFO: Access modifiers changed from: package-private */ public C15548gti(byte b, Object obj) { this.type = b; this.object = obj; } @Override // java.io.Externalizable public final void writeExternal(ObjectOutput objectOutput) throws IOException { writeInternal(this.type, this.object, objectOutput); } private static void writeInternal(byte b, Object obj, ObjectOutput objectOutput) throws IOException { objectOutput.writeByte(b); switch (b) { case 1: ((C15543gtd) obj).writeExternal(objectOutput); return; case 2: ((C15542gtc) obj).writeExternal(objectOutput); return; case 3: ((gsX) obj).writeExternal(objectOutput); return; case 4: ((EnumC15504gsZ) obj).writeExternal(objectOutput); return; case 5: ((C15547gth) obj).writeExternal(objectOutput); return; case 6: ((EnumC15546gtg) obj).writeExternal(objectOutput); return; case 7: ((C15550gtk) obj).writeExternal(objectOutput); return; case 8: ((EnumC15555gtp) obj).writeExternal(objectOutput); return; case 9: case 10: default: throw new InvalidClassException("Unknown serialized type"); case 11: ((gsR) obj).writeExternal(objectOutput); return; case 12: ((gsL) obj).writeExternal(objectOutput); return; case 13: ((gsP) obj).writeExternal(objectOutput); return; } } @Override // java.io.Externalizable public final void readExternal(ObjectInput objectInput) throws IOException, ClassNotFoundException { byte readByte = objectInput.readByte(); this.type = readByte; this.object = readInternal(readByte, objectInput); } static Object read(ObjectInput objectInput) throws IOException, ClassNotFoundException { return readInternal(objectInput.readByte(), objectInput); } private static Object readInternal(byte b, ObjectInput objectInput) throws IOException, ClassNotFoundException { switch (b) { case 1: return C15543gtd.readExternal(objectInput); case 2: return C15542gtc.readExternal(objectInput); case 3: return gsX.readExternal(objectInput); case 4: return EnumC15504gsZ.readExternal(objectInput); case 5: return C15547gth.readExternal(objectInput); case 6: return EnumC15546gtg.readExternal(objectInput); case 7: return C15550gtk.readExternal(objectInput); case 8: return EnumC15555gtp.readExternal(objectInput); case 9: case 10: default: throw new StreamCorruptedException("Unknown serialized type"); case 11: return gsR.readExternal(objectInput); case 12: return gsL.readExternal(objectInput); case 13: return gsP.readExternal(objectInput); } } private Object readResolve() { return this.object; } }