Added InputStream and Writer in constructor of Json classes

This commit is contained in:
Ziver Koc 2015-10-01 16:02:48 +00:00
parent 1dba0c88aa
commit 38f03585e4
4 changed files with 25 additions and 12 deletions

View file

@ -48,10 +48,17 @@ public class JSONObjectInputStream extends InputStream implements ObjectInput, C
private HashMap<Integer, Object> objectCache;
public JSONObjectInputStream(Reader in) {
this.parser = new JSONParser(in);
private JSONObjectInputStream() {
this.registeredClasses = new HashMap<>();
this.objectCache = new HashMap<>();
this.objectCache = new HashMap<>();
}
public JSONObjectInputStream(Reader in) {
this();
this.parser = new JSONParser(in);
}
public JSONObjectInputStream(InputStream in) {
this();
this.parser = new JSONParser(in);
}