From ef8f24c1f0420cfc1fc4a1cb743fdc1c11f01a1e Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 21 Apr 2011 21:50:32 +0000 Subject: Bugfix, forgot to clear my read buffer. --- java/com/xagasoft/gats/GatsInputStream.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'java/com/xagasoft') diff --git a/java/com/xagasoft/gats/GatsInputStream.java b/java/com/xagasoft/gats/GatsInputStream.java index e1c4781..9c36b1e 100644 --- a/java/com/xagasoft/gats/GatsInputStream.java +++ b/java/com/xagasoft/gats/GatsInputStream.java @@ -59,12 +59,17 @@ public class GatsInputStream if( baos.size() < iSize ) return null; + byte aTmp[] = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream( - baos.toByteArray() + aTmp ); bais.skip( 5 ); GatsObject goRet = GatsObject.read( bais ); + + baos.reset(); + baos.write( aTmp, iSize, aTmp.length-iSize ); + iVer = 0; return goRet; -- cgit v1.2.3