
org.numenta.nupic.serialize.HTMObjectOutput 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
The newest version!
package org.numenta.nupic.serialize;
import java.io.IOException;
import java.io.OutputStream;
import org.numenta.nupic.model.Persistable;
import org.nustaq.serialization.FSTConfiguration;
import org.nustaq.serialization.FSTObjectOutput;
public class HTMObjectOutput extends FSTObjectOutput {
public HTMObjectOutput(OutputStream out, FSTConfiguration config) {
super(out, config);
}
@SuppressWarnings("rawtypes")
public void writeObject(Object t, Class... c) throws IOException {
if(t instanceof Persistable) {
((Persistable) t).preSerialize();
}
super.writeObject(t, c);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy