From 4fb4a056c52d3a96b6ef9a4ceb5ce39fc716a9aa Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 21 Apr 2011 17:40:13 +0000 Subject: It...builds? --- java/com/xagasoft/gats/GatsObject.java | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 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 63fcf36..852a18c 100644 --- a/java/com/xagasoft/gats/GatsObject.java +++ b/java/com/xagasoft/gats/GatsObject.java @@ -1,6 +1,7 @@ package com.xagasoft.gats; import java.io.InputStream; +import java.io.OutputStream; public abstract class GatsObject { @@ -13,45 +14,45 @@ public abstract class GatsObject public abstract int getType(); - public abstract void read( InputStream is, char cType ); + public abstract void read( InputStream is, char cType ) throws java.io.IOException; - public static GatsObject read( InputStream is ) + public static GatsObject read( InputStream is ) throws java.io.IOException { - char type = is.read(); - GatsObject goRet; + char type = (char)is.read(); + GatsObject goRet = null; switch( type ) { case 'i': - goRet = new Integer(); + goRet = new GatsInteger(); break; case 's': - goRet = new String(); + // goRet = new GatsString(); break; case '0': case '1': - goRet = new Boolean(); + // goRet = new GatsBoolean(); break; case 'l': - goRet = new List(); + // goRet = new GatsList(); break; case 'd': - goRet = new Dictionary(); + // goRet = new GatsDictionary(); break; case 'f': case 'F': - goRet = new Float(); + // goRet = new GatsFloat(); break; case 'e': return null; default: - throw new Exception("Invalid gats type discovered: " + (char)type ); + throw new java.io.IOException("Invalid gats type discovered: " + (char)type ); } goRet.read( is, type ); -- cgit v1.2.3