diff options
-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; |