Skip to content

Commit

Permalink
Use different FSTObjectInput constructor which passes in the FSTConfi…
Browse files Browse the repository at this point in the history
…guration
  • Loading branch information
cogmission committed May 2, 2016
1 parent 0b3630f commit 6693834
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/main/java/org/numenta/nupic/serialize/HTMObjectInput.java
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/numenta/nupic/serialize/SerializerCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand All @@ -113,7 +113,7 @@ public HTMObjectInput getObjectInput(InputStream is) throws IOException {
* @return the HTMObjectOutput
*/
public <T extends Persistable> HTMObjectOutput getObjectOutput(OutputStream os) {
return new HTMObjectOutput(os);
return new HTMObjectOutput(os, fastSerialConfig);
}

/**
Expand Down

0 comments on commit 6693834

Please sign in to comment.