From 669383442914841976aeb450f413e4f5cd6cdb81 Mon Sep 17 00:00:00 2001 From: cogmission Date: Sun, 1 May 2016 20:44:03 -0500 Subject: [PATCH] Use different FSTObjectInput constructor which passes in the FSTConfiguration --- .../java/org/numenta/nupic/serialize/HTMObjectInput.java | 5 +++-- .../java/org/numenta/nupic/serialize/HTMObjectOutput.java | 5 +++-- .../java/org/numenta/nupic/serialize/SerializerCore.java | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/numenta/nupic/serialize/HTMObjectInput.java b/src/main/java/org/numenta/nupic/serialize/HTMObjectInput.java index 27c935e1..65661d32 100644 --- a/src/main/java/org/numenta/nupic/serialize/HTMObjectInput.java +++ b/src/main/java/org/numenta/nupic/serialize/HTMObjectInput.java @@ -4,11 +4,12 @@ import java.io.InputStream; import org.numenta.nupic.Persistable; +import org.nustaq.serialization.FSTConfiguration; import org.nustaq.serialization.FSTObjectInput; public class HTMObjectInput extends FSTObjectInput { - public HTMObjectInput(InputStream in) throws IOException { - super(in); + public HTMObjectInput(InputStream in, FSTConfiguration config) throws IOException { + super(in, config); } @SuppressWarnings("rawtypes") diff --git a/src/main/java/org/numenta/nupic/serialize/HTMObjectOutput.java b/src/main/java/org/numenta/nupic/serialize/HTMObjectOutput.java index 463fd78c..543d8af0 100644 --- a/src/main/java/org/numenta/nupic/serialize/HTMObjectOutput.java +++ b/src/main/java/org/numenta/nupic/serialize/HTMObjectOutput.java @@ -4,11 +4,12 @@ import java.io.OutputStream; import org.numenta.nupic.Persistable; +import org.nustaq.serialization.FSTConfiguration; import org.nustaq.serialization.FSTObjectOutput; public class HTMObjectOutput extends FSTObjectOutput { - public HTMObjectOutput(OutputStream out) { - super(out); + public HTMObjectOutput(OutputStream out, FSTConfiguration config) { + super(out, config); } @SuppressWarnings("rawtypes") diff --git a/src/main/java/org/numenta/nupic/serialize/SerializerCore.java b/src/main/java/org/numenta/nupic/serialize/SerializerCore.java index 190a36df..ec9f680c 100644 --- a/src/main/java/org/numenta/nupic/serialize/SerializerCore.java +++ b/src/main/java/org/numenta/nupic/serialize/SerializerCore.java @@ -104,7 +104,7 @@ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundE * @throws IOException */ public HTMObjectInput getObjectInput(InputStream is) throws IOException { - return new HTMObjectInput(is); + return new HTMObjectInput(is, fastSerialConfig); } /** @@ -113,7 +113,7 @@ public HTMObjectInput getObjectInput(InputStream is) throws IOException { * @return the HTMObjectOutput */ public HTMObjectOutput getObjectOutput(OutputStream os) { - return new HTMObjectOutput(os); + return new HTMObjectOutput(os, fastSerialConfig); } /**