From 7dd5c386611e31930e7ccfb83cb585df27696881 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 1 Mar 2012 04:24:35 +0000 Subject: Fixed a bug in java gats reading large strings over the network. --- java/com/xagasoft/gats/GatsObject.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'java/com/xagasoft/gats/GatsObject.java') diff --git a/java/com/xagasoft/gats/GatsObject.java b/java/com/xagasoft/gats/GatsObject.java index fc3fb5a..47602b3 100644 --- a/java/com/xagasoft/gats/GatsObject.java +++ b/java/com/xagasoft/gats/GatsObject.java @@ -43,7 +43,8 @@ public abstract class GatsObject */ static GatsObject read( InputStream is ) throws java.io.IOException { - char type = (char)is.read(); + int b = is.read(); + char type = (char)b; GatsObject goRet = null; switch( type ) { @@ -77,7 +78,7 @@ public abstract class GatsObject return null; default: - throw new java.io.IOException("Invalid gats type discovered: " + (char)type ); + throw new java.io.IOException("Invalid gats type discovered: " + type + ", (" + b + ")" ); } goRet.read( is, type ); -- cgit v1.2.3