
org.numenta.nupic.serialize.HTMObjectInput Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of htm.java Show documentation
Show all versions of htm.java Show documentation
The Java version of Numenta's HTM technology
package org.numenta.nupic.serialize;
import java.io.IOException;
import java.io.InputStream;
import org.numenta.nupic.model.Persistable;
import org.nustaq.serialization.FSTConfiguration;
import org.nustaq.serialization.FSTObjectInput;
public class HTMObjectInput extends FSTObjectInput {
public HTMObjectInput(InputStream in, FSTConfiguration config) throws IOException {
super(in, config);
}
@SuppressWarnings("rawtypes")
public Object readObject(Class...classes) throws Exception {
try {
Object obj = super.readObject(classes);
if(obj instanceof Persistable) {
((Persistable) obj).postDeSerialize();
}
return obj;
}catch(Exception e) {
throw new IOException(e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy