From 207384f738ebe9dea5170d4ec225f9684d39ee2e Mon Sep 17 00:00:00 2001 From: David Date: Wed, 27 Apr 2011 18:55:22 +0000 Subject: david - some changes --- java/com/xagasoft/gats/GatsInputStream.java | 2 +- java/com/xagasoft/gats/GatsOutputStream.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'java/com') 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 if( iGoal > 1500 ) iGoal = 1500; - int iRead = is.read( aBuf ); + int iRead = is.read( aBuf, 0, iGoal ); baos.write( aBuf, 0, iRead ); 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 this.os = os; } - public void writeObject( GatsObject obj ) throws java.io.IOException + public int writeObject( GatsObject obj ) throws java.io.IOException { ByteArrayOutputStream bos1 = new ByteArrayOutputStream(); @@ -29,6 +29,7 @@ public class GatsOutputStream bos2.write( bos1.toByteArray() ); os.write( bos2.toByteArray() ); + return bos1.size()+5; } }; -- cgit v1.2.3