what-the-bank/sources/com/kofax/kmc/ken/engines/ImageClassificationResult.java

70 lines
2.5 KiB
Java

package com.kofax.kmc.ken.engines;
import com.kofax.kmc.ken.engines.version.KenVersion;
import com.kofax.kmc.kut.utilities.SdkVersion;
import com.kofax.kmc.kut.utilities.error.ErrorInfo;
import com.kofax.kmc.kut.utilities.error.KmcRuntimeException;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
@Deprecated
/* loaded from: classes3.dex */
public class ImageClassificationResult implements Serializable {
private static final long serialVersionUID = -5981021011261327362L;
private transient String ah;
private transient Integer ai;
private transient Float aj;
public ImageClassificationResult() {
this.ah = null;
this.ai = -1;
this.aj = Float.valueOf(-5000.0f);
}
public ImageClassificationResult(String str, float f, int i) {
this.ah = null;
this.ai = -1;
this.aj = Float.valueOf(-5000.0f);
this.ah = str;
this.ai = Integer.valueOf(i);
this.aj = Float.valueOf(f);
}
public float getConfidence() {
return this.aj.floatValue();
}
public int getOrientation() {
return this.ai.intValue();
}
private void writeObject(ObjectOutputStream objectOutputStream) throws IOException {
objectOutputStream.defaultWriteObject();
objectOutputStream.writeObject(ImageClassificationResult.class.getName());
objectOutputStream.writeObject(KenVersion.getPackageVersion());
objectOutputStream.writeObject(this.ah);
objectOutputStream.writeObject(this.ai);
objectOutputStream.writeObject(this.aj);
}
private void readObject(ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException, KmcRuntimeException {
objectInputStream.defaultReadObject();
if (ImageClassificationResult.class.getName().compareToIgnoreCase((String) objectInputStream.readObject()) == 0) {
if (SdkVersion.versionCompatible(KenVersion.getPackageVersion(), (String) objectInputStream.readObject()).booleanValue()) {
this.ah = (String) objectInputStream.readObject();
this.ai = (Integer) objectInputStream.readObject();
this.aj = (Float) objectInputStream.readObject();
return;
}
throw new KmcRuntimeException(ErrorInfo.KMC_GN_DESERIALIZE_VERSION_ERROR);
}
throw new KmcRuntimeException(ErrorInfo.KMC_GN_DESERIALIZE_OBJECT_ERROR);
}
public String getClassId() {
return this.ah;
}
}