aboutsummaryrefslogtreecommitdiff
path: root/java/com/xagasoft/gats/GatsObject.java
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-03-01 04:24:35 +0000
committerMike Buland <eichlan@xagasoft.com>2012-03-01 04:24:35 +0000
commit7dd5c386611e31930e7ccfb83cb585df27696881 (patch)
tree3e88dea538b32b8c6fbc21036a4f4998bf57ba97 /java/com/xagasoft/gats/GatsObject.java
parent93831404b4d4ba4e964ebe542c52bc196585d4ab (diff)
downloadlibgats-7dd5c386611e31930e7ccfb83cb585df27696881.tar.gz
libgats-7dd5c386611e31930e7ccfb83cb585df27696881.tar.bz2
libgats-7dd5c386611e31930e7ccfb83cb585df27696881.tar.xz
libgats-7dd5c386611e31930e7ccfb83cb585df27696881.zip
Fixed a bug in java gats reading large strings over the network.
Diffstat (limited to 'java/com/xagasoft/gats/GatsObject.java')
-rw-r--r--java/com/xagasoft/gats/GatsObject.java5
1 files changed, 3 insertions, 2 deletions
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
43 */ 43 */
44 static GatsObject read( InputStream is ) throws java.io.IOException 44 static GatsObject read( InputStream is ) throws java.io.IOException
45 { 45 {
46 char type = (char)is.read(); 46 int b = is.read();
47 char type = (char)b;
47 GatsObject goRet = null; 48 GatsObject goRet = null;
48 switch( type ) 49 switch( type )
49 { 50 {
@@ -77,7 +78,7 @@ public abstract class GatsObject
77 return null; 78 return null;
78 79
79 default: 80 default:
80 throw new java.io.IOException("Invalid gats type discovered: " + (char)type ); 81 throw new java.io.IOException("Invalid gats type discovered: " + type + ", (" + b + ")" );
81 } 82 }
82 83
83 goRet.read( is, type ); 84 goRet.read( is, type );