diff options
author | Mike Buland <eichlan@xagasoft.com> | 2011-04-21 21:50:32 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2011-04-21 21:50:32 +0000 |
commit | ef8f24c1f0420cfc1fc4a1cb743fdc1c11f01a1e (patch) | |
tree | 5e0f2866ada347b3acf24f4dc20b9eb68254a345 | |
parent | 3e86497f740d9b6e2409b4c425da4fc971842873 (diff) | |
download | libgats-ef8f24c1f0420cfc1fc4a1cb743fdc1c11f01a1e.tar.gz libgats-ef8f24c1f0420cfc1fc4a1cb743fdc1c11f01a1e.tar.bz2 libgats-ef8f24c1f0420cfc1fc4a1cb743fdc1c11f01a1e.tar.xz libgats-ef8f24c1f0420cfc1fc4a1cb743fdc1c11f01a1e.zip |
Bugfix, forgot to clear my read buffer.
-rw-r--r-- | java/com/xagasoft/gats/GatsInputStream.java | 7 |
1 files changed, 6 insertions, 1 deletions
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 | |||
59 | if( baos.size() < iSize ) | 59 | if( baos.size() < iSize ) |
60 | return null; | 60 | return null; |
61 | 61 | ||
62 | byte aTmp[] = baos.toByteArray(); | ||
62 | ByteArrayInputStream bais = new ByteArrayInputStream( | 63 | ByteArrayInputStream bais = new ByteArrayInputStream( |
63 | baos.toByteArray() | 64 | aTmp |
64 | ); | 65 | ); |
65 | bais.skip( 5 ); | 66 | bais.skip( 5 ); |
66 | 67 | ||
67 | GatsObject goRet = GatsObject.read( bais ); | 68 | GatsObject goRet = GatsObject.read( bais ); |
69 | |||
70 | baos.reset(); | ||
71 | baos.write( aTmp, iSize, aTmp.length-iSize ); | ||
72 | |||
68 | iVer = 0; | 73 | iVer = 0; |
69 | 74 | ||
70 | return goRet; | 75 | return goRet; |