aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid <david@xagasoft.com>2011-04-27 18:55:22 +0000
committerDavid <david@xagasoft.com>2011-04-27 18:55:22 +0000
commit207384f738ebe9dea5170d4ec225f9684d39ee2e (patch)
tree6d0fd34f88e4cb2da8cc01043994df7f46b317a1
parentef8f24c1f0420cfc1fc4a1cb743fdc1c11f01a1e (diff)
downloadlibgats-207384f738ebe9dea5170d4ec225f9684d39ee2e.tar.gz
libgats-207384f738ebe9dea5170d4ec225f9684d39ee2e.tar.bz2
libgats-207384f738ebe9dea5170d4ec225f9684d39ee2e.tar.xz
libgats-207384f738ebe9dea5170d4ec225f9684d39ee2e.zip
david - some changes
-rw-r--r--java/com/xagasoft/gats/GatsInputStream.java2
-rw-r--r--java/com/xagasoft/gats/GatsOutputStream.java3
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