X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altoslib%2FAltosJson.java;h=190d263363dd680898d80a173311c9ebb7e7a1c5;hb=171d12cb7bb0ea185e9b8b6d90e1c0fb94b19008;hp=9191be68004d6297d4fea25ae61747669478816c;hpb=17e20a6d2dab1f4bd1375bfd9e1c5230ee2c1119;p=fw%2Faltos diff --git a/altoslib/AltosJson.java b/altoslib/AltosJson.java index 9191be68..190d2633 100644 --- a/altoslib/AltosJson.java +++ b/altoslib/AltosJson.java @@ -16,7 +16,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_11; +package org.altusmetrum.altoslib_13; import java.io.*; import java.util.*; @@ -255,7 +255,7 @@ class JsonToken { * Lexer for json */ class JsonLexer extends JsonUtil { - Reader f; + InputStream f; int line; int ungot = -2; StringBuffer pending_token; @@ -445,12 +445,12 @@ class JsonLexer extends JsonUtil { } JsonLexer(String s) { - f = new StringReader(s); + f = new AltosStringInputStream(s); line = 1; token = null; } - JsonLexer(Reader f) { + JsonLexer(InputStream f) { this.f = f; line = 1; token = null; @@ -570,7 +570,7 @@ class JsonParse { lexer = new JsonLexer(s); } - JsonParse(Reader f) { + JsonParse(InputStream f) { lexer = new JsonLexer(f); } } @@ -670,7 +670,7 @@ public class AltosJson extends JsonUtil { } } - public static AltosJson fromReader(Reader f) { + public static AltosJson fromInputStream(InputStream f) { JsonParse parse = new JsonParse(f); try { return parse.parse();