diff options
Diffstat (limited to '')
-rw-r--r-- | java/com/xagasoft/gats/GatsInputStream.java | 2 | ||||
-rw-r--r-- | java/com/xagasoft/gats/GatsOutputStream.java | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/java/com/xagasoft/gats/GatsInputStream.java b/java/com/xagasoft/gats/GatsInputStream.java index 9c36b1e..8eac738 100644 --- a/java/com/xagasoft/gats/GatsInputStream.java +++ b/java/com/xagasoft/gats/GatsInputStream.java | |||
@@ -49,7 +49,7 @@ public class GatsInputStream | |||
49 | if( iGoal > 1500 ) | 49 | if( iGoal > 1500 ) |
50 | iGoal = 1500; | 50 | iGoal = 1500; |
51 | 51 | ||
52 | int iRead = is.read( aBuf ); | 52 | int iRead = is.read( aBuf, 0, iGoal ); |
53 | baos.write( aBuf, 0, iRead ); | 53 | baos.write( aBuf, 0, iRead ); |
54 | 54 | ||
55 | if( iRead < iGoal ) | 55 | if( iRead < iGoal ) |
diff --git a/java/com/xagasoft/gats/GatsOutputStream.java b/java/com/xagasoft/gats/GatsOutputStream.java index 7bdfcde..a0f4503 100644 --- a/java/com/xagasoft/gats/GatsOutputStream.java +++ b/java/com/xagasoft/gats/GatsOutputStream.java | |||
@@ -13,7 +13,7 @@ public class GatsOutputStream | |||
13 | this.os = os; | 13 | this.os = os; |
14 | } | 14 | } |
15 | 15 | ||
16 | public void writeObject( GatsObject obj ) throws java.io.IOException | 16 | public int writeObject( GatsObject obj ) throws java.io.IOException |
17 | { | 17 | { |
18 | ByteArrayOutputStream bos1 = new ByteArrayOutputStream(); | 18 | ByteArrayOutputStream bos1 = new ByteArrayOutputStream(); |
19 | 19 | ||
@@ -29,6 +29,7 @@ public class GatsOutputStream | |||
29 | bos2.write( bos1.toByteArray() ); | 29 | bos2.write( bos1.toByteArray() ); |
30 | 30 | ||
31 | os.write( bos2.toByteArray() ); | 31 | os.write( bos2.toByteArray() ); |
32 | return bos1.size()+5; | ||
32 | } | 33 | } |
33 | }; | 34 | }; |
34 | 35 | ||