You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ra...@apache.org on 2006/11/02 16:50:11 UTC

svn commit: r470398 [1/5] - in /incubator/activemq/trunk/activemq-core/src: main/java/org/apache/activemq/openwire/ main/java/org/apache/activemq/openwire/v1/ main/java/org/apache/activemq/openwire/v2/ main/java/org/apache/activemq/transport/stomp/ mai...

Author: rajdavies
Date: Thu Nov  2 07:49:58 2006
New Revision: 470398

URL: http://svn.apache.org/viewvc?view=rev&rev=470398
Log:
Use Input/Output Stream intefaces instead of concrete classes

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/BooleanStream.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/DataStreamMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQDestinationMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMessageMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQQueueMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTopicMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseCommandMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseDataStreamMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerIdMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerInfoMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionControlMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionErrorMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionIdMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionInfoMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerControlMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerIdMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerInfoMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ControlCommandMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DataArrayResponseMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DataResponseMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DataStructureSupportMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DestinationInfoMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DiscoveryEventMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ExceptionResponseMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/FlushCommandMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/IntegerResponseMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalQueueAckMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalTopicAckMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalTraceMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalTransactionMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/KeepAliveInfoMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/LastPartialCommandMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/LocalTransactionIdMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageAckMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageDispatchMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageDispatchNotificationMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageIdMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/NetworkBridgeFilterMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/PartialCommandMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ProducerIdMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ProducerInfoMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/RemoveInfoMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/RemoveSubscriptionInfoMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ReplayCommandMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ResponseMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/SessionIdMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/SessionInfoMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ShutdownInfoMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/SubscriptionInfoMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/TransactionIdMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/TransactionInfoMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/WireFormatInfoMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/XATransactionIdMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQBytesMessageMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQDestinationMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQMapMessageMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQMessageMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQObjectMessageMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQQueueMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQStreamMessageMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQTempDestinationMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQTempQueueMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQTempTopicMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQTextMessageMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQTopicMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/BaseCommandMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/BaseDataStreamMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/BrokerIdMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/BrokerInfoMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConnectionControlMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConnectionErrorMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConnectionIdMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConnectionInfoMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConsumerControlMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConsumerIdMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConsumerInfoMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ControlCommandMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/DataArrayResponseMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/DataResponseMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/DestinationInfoMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/DiscoveryEventMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ExceptionResponseMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/FlushCommandMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/IntegerResponseMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/JournalQueueAckMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/JournalTopicAckMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/JournalTraceMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/JournalTransactionMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/KeepAliveInfoMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/LastPartialCommandMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/LocalTransactionIdMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessageAckMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessageDispatchMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessageDispatchNotificationMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessageIdMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessageMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessagePullMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/NetworkBridgeFilterMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/PartialCommandMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ProducerIdMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ProducerInfoMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/RemoveInfoMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/RemoveSubscriptionInfoMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ReplayCommandMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ResponseMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/SessionIdMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/SessionInfoMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ShutdownInfoMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/SubscriptionInfoMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/TransactionIdMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/TransactionInfoMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/WireFormatInfoMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/XATransactionIdMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompWireFormat.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/wireformat/ObjectStreamWireFormat.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/wireformat/WireFormat.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ConsumerInfoTest.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/BooleanStream.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/BooleanStream.java?view=diff&rev=470398&r1=470397&r2=470398
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/BooleanStream.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/BooleanStream.java Thu Nov  2 07:49:58 2006
@@ -17,7 +17,9 @@
  */
 package org.apache.activemq.openwire;
 
+import java.io.DataInput;
 import java.io.DataInputStream;
+import java.io.DataOutput;
 import java.io.DataOutputStream;
 import java.io.IOException;
 import java.nio.ByteBuffer;
@@ -61,7 +63,7 @@
         }
     }
     
-    public void marshal(DataOutputStream dataOut) throws IOException {
+    public void marshal(DataOutput dataOut) throws IOException {
         if( arrayLimit < 64 ) {
             dataOut.writeByte(arrayLimit);
         } else if( arrayLimit < 256 ) { // max value of unsigned byte
@@ -91,7 +93,7 @@
     }
 
 
-    public void unmarshal(DataInputStream dataIn) throws IOException {
+    public void unmarshal(DataInput dataIn) throws IOException {
         
         arrayLimit = (short) (dataIn.readByte() & 0xFF);
         if ( arrayLimit == 0xC0 ) {

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/DataStreamMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/DataStreamMarshaller.java?view=diff&rev=470398&r1=470397&r2=470398
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/DataStreamMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/DataStreamMarshaller.java Thu Nov  2 07:49:58 2006
@@ -17,7 +17,9 @@
  */
 package org.apache.activemq.openwire;
 
+import java.io.DataInput;
 import java.io.DataInputStream;
+import java.io.DataOutput;
 import java.io.DataOutputStream;
 import java.io.IOException;
 
@@ -29,10 +31,10 @@
     DataStructure createObject();
 
     int tightMarshal1(OpenWireFormat format, Object c, BooleanStream bs) throws IOException;
-    void tightMarshal2(OpenWireFormat format, Object c, DataOutputStream ds, BooleanStream bs) throws IOException;
-    void tightUnmarshal(OpenWireFormat format, Object data, DataInputStream dis, BooleanStream bs) throws IOException;
+    void tightMarshal2(OpenWireFormat format, Object c, DataOutput ds, BooleanStream bs) throws IOException;
+    void tightUnmarshal(OpenWireFormat format, Object data, DataInput dis, BooleanStream bs) throws IOException;
 
-    void looseMarshal(OpenWireFormat format, Object c, DataOutputStream ds) throws IOException;
-    void looseUnmarshal(OpenWireFormat format, Object data, DataInputStream dis) throws IOException;
+    void looseMarshal(OpenWireFormat format, Object c, DataOutput ds) throws IOException;
+    void looseUnmarshal(OpenWireFormat format, Object data, DataInput dis) throws IOException;
     
 }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java?view=diff&rev=470398&r1=470397&r2=470398
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java Thu Nov  2 07:49:58 2006
@@ -17,8 +17,8 @@
  */
 package org.apache.activemq.openwire;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
+import java.io.DataInput;
+import java.io.DataOutput;
 import java.io.IOException;
 import java.lang.reflect.Method;
 import java.util.HashMap;
@@ -27,11 +27,11 @@
 import org.apache.activemq.command.DataStructure;
 import org.apache.activemq.command.MarshallAware;
 import org.apache.activemq.command.WireFormatInfo;
-import org.apache.activemq.util.ByteArrayInputStream;
-import org.apache.activemq.util.ByteArrayOutputStream;
 import org.apache.activemq.util.ByteSequence;
 import org.apache.activemq.util.ByteSequenceData;
 import org.apache.activemq.util.ClassLoading;
+import org.apache.activemq.util.DataByteArrayInputStream;
+import org.apache.activemq.util.DataByteArrayOutputStream;
 import org.apache.activemq.util.IdGenerator;
 import org.apache.activemq.wireformat.WireFormat;
 
@@ -59,11 +59,12 @@
     private HashMap marshallCacheMap = new HashMap();
     private DataStructure marshallCache[] = new DataStructure[MARSHAL_CACHE_SIZE];
     private DataStructure unmarshallCache[] = new DataStructure[MARSHAL_CACHE_SIZE];
-    
+    private DataByteArrayOutputStream bytesOut = new DataByteArrayOutputStream();
+    private DataByteArrayInputStream bytesIn = new DataByteArrayInputStream();
 	private WireFormatInfo preferedWireFormatInfo;
             
 	public OpenWireFormat() {
-		this(1);
+		this(2);
 	}
 	
     public OpenWireFormat(int i) {
@@ -148,28 +149,23 @@
                     size += dsm.tightMarshal1(this, c, bs);
                     size += bs.marshalledSize();
     
-                    ByteArrayOutputStream baos = new ByteArrayOutputStream(size);
-                    DataOutputStream ds = new DataOutputStream(baos);
+                    bytesOut.restart(size);
                     if( !sizePrefixDisabled ) {
-                        ds.writeInt(size);
+                        bytesOut.writeInt(size);
                     }
-                    ds.writeByte(type);
-                    bs.marshal(ds);
-                    dsm.tightMarshal2(this, c, ds, bs);                
-                    ds.close();
-                    sequence = baos.toByteSequence();
+                    bytesOut.writeByte(type);
+                    bs.marshal(bytesOut);
+                    dsm.tightMarshal2(this, c, bytesOut, bs);                
+                    sequence = bytesOut.toByteSequence();
                     
                 } else {
-                    
-                    ByteArrayOutputStream baos = new ByteArrayOutputStream();
-                    DataOutputStream ds = new DataOutputStream(baos);
+                    bytesOut.restart();
                     if( !sizePrefixDisabled ) {
-                        ds.writeInt(0); // we don't know the final size yet but write this here for now.
+                        bytesOut.writeInt(0); // we don't know the final size yet but write this here for now.
                     }
-                    ds.writeByte(type);
-                    dsm.looseMarshal(this, c, ds);                
-                    ds.close();
-                    sequence = baos.toByteSequence();
+                    bytesOut.writeByte(type);
+                    dsm.looseMarshal(this, c, bytesOut);                
+                    sequence = bytesOut.toByteSequence();
                     
                     if( !sizePrefixDisabled ) {
                         size = sequence.getLength()-4;
@@ -181,13 +177,10 @@
                 
                 
             } else {
-                
-                ByteArrayOutputStream baos = new ByteArrayOutputStream(5);
-                DataOutputStream daos = new DataOutputStream(baos);
-                daos.writeInt(size);
-                daos.writeByte(NULL_TYPE);
-                daos.close();
-                sequence = baos.toByteSequence();
+                bytesOut.restart(5);
+                bytesOut.writeInt(size);
+                bytesOut.writeByte(NULL_TYPE);
+                sequence = bytesOut.toByteSequence();
             }
             
             if( ma!=null ) {
@@ -198,23 +191,24 @@
     }
     
     public Object unmarshal(ByteSequence sequence) throws IOException {
-        DataInputStream dis = new DataInputStream(new ByteArrayInputStream(sequence));
+        bytesIn.restart(sequence);
+        //DataInputStream dis = new DataInputStream(new ByteArrayInputStream(sequence));
         
         if( !sizePrefixDisabled ) {
-            int size = dis.readInt();
+            int size = bytesIn.readInt();
             if( sequence.getLength()-4 != size ) {
     //            throw new IOException("Packet size does not match marshaled size");
             }
         }
         
-        Object command = doUnmarshal(dis);
+        Object command = doUnmarshal(bytesIn);
         if( !cacheEnabled && ((DataStructure)command).isMarshallAware() ) {
             ((MarshallAware) command).setCachedMarshalledForm(this, sequence);
         }
         return command;
     }
     
-    public void marshal(Object o, DataOutputStream dataOut) throws IOException {
+    public void marshal(Object o, DataOutput dataOut) throws IOException {
         
         if( cacheEnabled ) {
             runMarshallCacheEvictionSweep();
@@ -243,20 +237,18 @@
 	            dsm.tightMarshal2(this, c, dataOut, bs);
                 
             } else {            	
-            	DataOutputStream looseOut = dataOut;
-            	ByteArrayOutputStream baos=null;
-            	
+            	DataOutput looseOut = dataOut;
+            	            	
             	if( !sizePrefixDisabled ) {
-	                baos = new ByteArrayOutputStream();
-	                looseOut = new DataOutputStream(baos);
+	                bytesOut.restart();
+	                looseOut = bytesOut;
                 }
                 
                 looseOut.writeByte(type);
                 dsm.looseMarshal(this, c, looseOut);
                 
                 if( !sizePrefixDisabled ) {
-                    looseOut.close();
-                    ByteSequence sequence = baos.toByteSequence();
+                    ByteSequence sequence = bytesOut.toByteSequence();
                     dataOut.writeInt(sequence.getLength());
                     dataOut.write(sequence.getData(), sequence.getOffset(), sequence.getLength());
                 }
@@ -269,11 +261,16 @@
         }
     }
 
-    public Object unmarshal(DataInputStream dis) throws IOException {
+    public Object unmarshal(DataInput dis) throws IOException {
+        DataInput dataIn = dis;
         if( !sizePrefixDisabled ) {
-        	dis.readInt();
+        	int size = dis.readInt();
+            //byte[] data = new byte[size];
+            //dis.readFully(data);
+            //bytesIn.restart(data);
+            //dataIn = bytesIn;
         }
-        return doUnmarshal(dis);
+        return doUnmarshal(dataIn);
     }
     
     /**
@@ -297,7 +294,7 @@
     /**
      * Used by NIO or AIO transports; note that the size is not written as part of this method.
      */
-    public void tightMarshal2(Object o, DataOutputStream ds, BooleanStream bs) throws IOException {
+    public void tightMarshal2(Object o, DataOutput ds, BooleanStream bs) throws IOException {
         if( cacheEnabled ) {
             runMarshallCacheEvictionSweep();
         }
@@ -337,7 +334,7 @@
         this.version = version;
     }
         
-    public Object doUnmarshal(DataInputStream dis) throws IOException {
+    public Object doUnmarshal(DataInput dis) throws IOException {
         byte dataType = dis.readByte();
         if( dataType!=NULL_TYPE ) {
             DataStreamMarshaller dsm = (DataStreamMarshaller) dataMarshallers[dataType & 0xFF];
@@ -382,7 +379,7 @@
         return 1 + dsm.tightMarshal1(this, o, bs);
     }
     
-    public void tightMarshalNestedObject2(DataStructure o, DataOutputStream ds, BooleanStream bs) throws IOException {
+    public void tightMarshalNestedObject2(DataStructure o, DataOutput ds, BooleanStream bs) throws IOException {
         if( !bs.readBoolean() ) 
             return;
             
@@ -405,7 +402,7 @@
         }
     }
     
-    public DataStructure tightUnmarshalNestedObject(DataInputStream dis, BooleanStream bs) throws IOException {
+    public DataStructure tightUnmarshalNestedObject(DataInput dis, BooleanStream bs) throws IOException {
         if( bs.readBoolean() ) {
             
             byte dataType = dis.readByte();
@@ -437,7 +434,7 @@
         }
     }
     
-    public DataStructure looseUnmarshalNestedObject(DataInputStream dis) throws IOException {
+    public DataStructure looseUnmarshalNestedObject(DataInput dis) throws IOException {
         if( dis.readBoolean() ) {
             
             byte dataType = dis.readByte();
@@ -453,7 +450,7 @@
         }
     }
 
-    public void looseMarshalNestedObject(DataStructure o, DataOutputStream dataOut) throws IOException {
+    public void looseMarshalNestedObject(DataStructure o, DataOutput dataOut) throws IOException {
         dataOut.writeBoolean(o!=null);
         if( o!=null ) {
             byte type = o.getDataStructureType();

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageMarshaller.java?view=diff&rev=470398&r1=470397&r2=470398
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageMarshaller.java Thu Nov  2 07:49:58 2006
@@ -18,8 +18,8 @@
 
 package org.apache.activemq.openwire.v1;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
+import java.io.DataInput;
+import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.activemq.openwire.*;
@@ -62,7 +62,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
         super.tightUnmarshal(wireFormat, o, dataIn, bs);
 
     }
@@ -85,7 +85,7 @@
      * @param dataOut the output stream
      * @throws IOException thrown if an error occurs
      */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
         super.tightMarshal2(wireFormat, o, dataOut, bs);
 
     }
@@ -97,7 +97,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn) throws IOException {
+    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
         super.looseUnmarshal(wireFormat, o, dataIn);
 
     }
@@ -106,7 +106,7 @@
     /**
      * Write the booleans that this object uses to a BooleanStream
      */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
 
         super.looseMarshal(wireFormat, o, dataOut);
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQDestinationMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQDestinationMarshaller.java?view=diff&rev=470398&r1=470397&r2=470398
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQDestinationMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQDestinationMarshaller.java Thu Nov  2 07:49:58 2006
@@ -18,8 +18,8 @@
 
 package org.apache.activemq.openwire.v1;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
+import java.io.DataInput;
+import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.activemq.openwire.*;
@@ -47,7 +47,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
         super.tightUnmarshal(wireFormat, o, dataIn, bs);
 
         ActiveMQDestination info = (ActiveMQDestination)o;
@@ -76,7 +76,7 @@
      * @param dataOut the output stream
      * @throws IOException thrown if an error occurs
      */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
         super.tightMarshal2(wireFormat, o, dataOut, bs);
 
         ActiveMQDestination info = (ActiveMQDestination)o;
@@ -91,7 +91,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn) throws IOException {
+    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
         super.looseUnmarshal(wireFormat, o, dataIn);
 
         ActiveMQDestination info = (ActiveMQDestination)o;
@@ -103,7 +103,7 @@
     /**
      * Write the booleans that this object uses to a BooleanStream
      */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
 
         ActiveMQDestination info = (ActiveMQDestination)o;
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageMarshaller.java?view=diff&rev=470398&r1=470397&r2=470398
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageMarshaller.java Thu Nov  2 07:49:58 2006
@@ -18,8 +18,8 @@
 
 package org.apache.activemq.openwire.v1;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
+import java.io.DataInput;
+import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.activemq.openwire.*;
@@ -62,7 +62,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
         super.tightUnmarshal(wireFormat, o, dataIn, bs);
 
     }
@@ -85,7 +85,7 @@
      * @param dataOut the output stream
      * @throws IOException thrown if an error occurs
      */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
         super.tightMarshal2(wireFormat, o, dataOut, bs);
 
     }
@@ -97,7 +97,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn) throws IOException {
+    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
         super.looseUnmarshal(wireFormat, o, dataIn);
 
     }
@@ -106,7 +106,7 @@
     /**
      * Write the booleans that this object uses to a BooleanStream
      */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
 
         super.looseMarshal(wireFormat, o, dataOut);
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMessageMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMessageMarshaller.java?view=diff&rev=470398&r1=470397&r2=470398
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMessageMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMessageMarshaller.java Thu Nov  2 07:49:58 2006
@@ -18,8 +18,8 @@
 
 package org.apache.activemq.openwire.v1;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
+import java.io.DataInput;
+import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.activemq.openwire.*;
@@ -62,7 +62,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
         super.tightUnmarshal(wireFormat, o, dataIn, bs);
 
     }
@@ -85,7 +85,7 @@
      * @param dataOut the output stream
      * @throws IOException thrown if an error occurs
      */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
         super.tightMarshal2(wireFormat, o, dataOut, bs);
 
     }
@@ -97,7 +97,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn) throws IOException {
+    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
         super.looseUnmarshal(wireFormat, o, dataIn);
 
     }
@@ -106,7 +106,7 @@
     /**
      * Write the booleans that this object uses to a BooleanStream
      */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
 
         super.looseMarshal(wireFormat, o, dataOut);
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageMarshaller.java?view=diff&rev=470398&r1=470397&r2=470398
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageMarshaller.java Thu Nov  2 07:49:58 2006
@@ -18,8 +18,8 @@
 
 package org.apache.activemq.openwire.v1;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
+import java.io.DataInput;
+import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.activemq.openwire.*;
@@ -62,7 +62,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
         super.tightUnmarshal(wireFormat, o, dataIn, bs);
 
     }
@@ -85,7 +85,7 @@
      * @param dataOut the output stream
      * @throws IOException thrown if an error occurs
      */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
         super.tightMarshal2(wireFormat, o, dataOut, bs);
 
     }
@@ -97,7 +97,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn) throws IOException {
+    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
         super.looseUnmarshal(wireFormat, o, dataIn);
 
     }
@@ -106,7 +106,7 @@
     /**
      * Write the booleans that this object uses to a BooleanStream
      */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
 
         super.looseMarshal(wireFormat, o, dataOut);
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQQueueMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQQueueMarshaller.java?view=diff&rev=470398&r1=470397&r2=470398
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQQueueMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQQueueMarshaller.java Thu Nov  2 07:49:58 2006
@@ -18,8 +18,8 @@
 
 package org.apache.activemq.openwire.v1;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
+import java.io.DataInput;
+import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.activemq.openwire.*;
@@ -62,7 +62,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
         super.tightUnmarshal(wireFormat, o, dataIn, bs);
 
     }
@@ -85,7 +85,7 @@
      * @param dataOut the output stream
      * @throws IOException thrown if an error occurs
      */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
         super.tightMarshal2(wireFormat, o, dataOut, bs);
 
     }
@@ -97,7 +97,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn) throws IOException {
+    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
         super.looseUnmarshal(wireFormat, o, dataIn);
 
     }
@@ -106,7 +106,7 @@
     /**
      * Write the booleans that this object uses to a BooleanStream
      */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
 
         super.looseMarshal(wireFormat, o, dataOut);
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageMarshaller.java?view=diff&rev=470398&r1=470397&r2=470398
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageMarshaller.java Thu Nov  2 07:49:58 2006
@@ -18,8 +18,8 @@
 
 package org.apache.activemq.openwire.v1;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
+import java.io.DataInput;
+import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.activemq.openwire.*;
@@ -62,7 +62,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
         super.tightUnmarshal(wireFormat, o, dataIn, bs);
 
     }
@@ -85,7 +85,7 @@
      * @param dataOut the output stream
      * @throws IOException thrown if an error occurs
      */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
         super.tightMarshal2(wireFormat, o, dataOut, bs);
 
     }
@@ -97,7 +97,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn) throws IOException {
+    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
         super.looseUnmarshal(wireFormat, o, dataIn);
 
     }
@@ -106,7 +106,7 @@
     /**
      * Write the booleans that this object uses to a BooleanStream
      */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
 
         super.looseMarshal(wireFormat, o, dataOut);
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationMarshaller.java?view=diff&rev=470398&r1=470397&r2=470398
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationMarshaller.java Thu Nov  2 07:49:58 2006
@@ -18,8 +18,8 @@
 
 package org.apache.activemq.openwire.v1;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
+import java.io.DataInput;
+import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.activemq.openwire.*;
@@ -47,7 +47,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
         super.tightUnmarshal(wireFormat, o, dataIn, bs);
 
     }
@@ -70,7 +70,7 @@
      * @param dataOut the output stream
      * @throws IOException thrown if an error occurs
      */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
         super.tightMarshal2(wireFormat, o, dataOut, bs);
 
     }
@@ -82,7 +82,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn) throws IOException {
+    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
         super.looseUnmarshal(wireFormat, o, dataIn);
 
     }
@@ -91,7 +91,7 @@
     /**
      * Write the booleans that this object uses to a BooleanStream
      */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
 
         super.looseMarshal(wireFormat, o, dataOut);
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueMarshaller.java?view=diff&rev=470398&r1=470397&r2=470398
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueMarshaller.java Thu Nov  2 07:49:58 2006
@@ -18,8 +18,8 @@
 
 package org.apache.activemq.openwire.v1;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
+import java.io.DataInput;
+import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.activemq.openwire.*;
@@ -62,7 +62,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
         super.tightUnmarshal(wireFormat, o, dataIn, bs);
 
     }
@@ -85,7 +85,7 @@
      * @param dataOut the output stream
      * @throws IOException thrown if an error occurs
      */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
         super.tightMarshal2(wireFormat, o, dataOut, bs);
 
     }
@@ -97,7 +97,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn) throws IOException {
+    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
         super.looseUnmarshal(wireFormat, o, dataIn);
 
     }
@@ -106,7 +106,7 @@
     /**
      * Write the booleans that this object uses to a BooleanStream
      */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
 
         super.looseMarshal(wireFormat, o, dataOut);
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicMarshaller.java?view=diff&rev=470398&r1=470397&r2=470398
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicMarshaller.java Thu Nov  2 07:49:58 2006
@@ -18,8 +18,8 @@
 
 package org.apache.activemq.openwire.v1;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
+import java.io.DataInput;
+import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.activemq.openwire.*;
@@ -62,7 +62,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
         super.tightUnmarshal(wireFormat, o, dataIn, bs);
 
     }
@@ -85,7 +85,7 @@
      * @param dataOut the output stream
      * @throws IOException thrown if an error occurs
      */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
         super.tightMarshal2(wireFormat, o, dataOut, bs);
 
     }
@@ -97,7 +97,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn) throws IOException {
+    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
         super.looseUnmarshal(wireFormat, o, dataIn);
 
     }
@@ -106,7 +106,7 @@
     /**
      * Write the booleans that this object uses to a BooleanStream
      */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
 
         super.looseMarshal(wireFormat, o, dataOut);
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageMarshaller.java?view=diff&rev=470398&r1=470397&r2=470398
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageMarshaller.java Thu Nov  2 07:49:58 2006
@@ -18,8 +18,8 @@
 
 package org.apache.activemq.openwire.v1;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
+import java.io.DataInput;
+import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.activemq.openwire.*;
@@ -62,7 +62,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
         super.tightUnmarshal(wireFormat, o, dataIn, bs);
 
     }
@@ -85,7 +85,7 @@
      * @param dataOut the output stream
      * @throws IOException thrown if an error occurs
      */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
         super.tightMarshal2(wireFormat, o, dataOut, bs);
 
     }
@@ -97,7 +97,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn) throws IOException {
+    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
         super.looseUnmarshal(wireFormat, o, dataIn);
 
     }
@@ -106,7 +106,7 @@
     /**
      * Write the booleans that this object uses to a BooleanStream
      */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
 
         super.looseMarshal(wireFormat, o, dataOut);
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTopicMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTopicMarshaller.java?view=diff&rev=470398&r1=470397&r2=470398
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTopicMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTopicMarshaller.java Thu Nov  2 07:49:58 2006
@@ -18,8 +18,8 @@
 
 package org.apache.activemq.openwire.v1;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
+import java.io.DataInput;
+import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.activemq.openwire.*;
@@ -62,7 +62,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
         super.tightUnmarshal(wireFormat, o, dataIn, bs);
 
     }
@@ -85,7 +85,7 @@
      * @param dataOut the output stream
      * @throws IOException thrown if an error occurs
      */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
         super.tightMarshal2(wireFormat, o, dataOut, bs);
 
     }
@@ -97,7 +97,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn) throws IOException {
+    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
         super.looseUnmarshal(wireFormat, o, dataIn);
 
     }
@@ -106,7 +106,7 @@
     /**
      * Write the booleans that this object uses to a BooleanStream
      */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
 
         super.looseMarshal(wireFormat, o, dataOut);
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseCommandMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseCommandMarshaller.java?view=diff&rev=470398&r1=470397&r2=470398
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseCommandMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseCommandMarshaller.java Thu Nov  2 07:49:58 2006
@@ -18,8 +18,8 @@
 
 package org.apache.activemq.openwire.v1;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
+import java.io.DataInput;
+import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.activemq.openwire.*;
@@ -47,7 +47,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
         super.tightUnmarshal(wireFormat, o, dataIn, bs);
 
         BaseCommand info = (BaseCommand)o;
@@ -77,7 +77,7 @@
      * @param dataOut the output stream
      * @throws IOException thrown if an error occurs
      */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
         super.tightMarshal2(wireFormat, o, dataOut, bs);
 
         BaseCommand info = (BaseCommand)o;
@@ -93,7 +93,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn) throws IOException {
+    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
         super.looseUnmarshal(wireFormat, o, dataIn);
 
         BaseCommand info = (BaseCommand)o;
@@ -106,7 +106,7 @@
     /**
      * Write the booleans that this object uses to a BooleanStream
      */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
 
         BaseCommand info = (BaseCommand)o;
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseDataStreamMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseDataStreamMarshaller.java?view=diff&rev=470398&r1=470397&r2=470398
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseDataStreamMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseDataStreamMarshaller.java Thu Nov  2 07:49:58 2006
@@ -17,8 +17,8 @@
  */
 package org.apache.activemq.openwire.v1;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
+import java.io.DataInput;
+import java.io.DataOutput;
 import java.io.IOException;
 import java.lang.reflect.Constructor;
 
@@ -49,9 +49,9 @@
     public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
         return 0;
     }
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {        
+    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {        
     }
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {        
+    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {        
     }
     
     public int tightMarshalLong1(OpenWireFormat wireFormat, long o, BooleanStream bs) throws IOException {
@@ -73,7 +73,7 @@
             return 8;
         }
     }
-    public void tightMarshalLong2(OpenWireFormat wireFormat, long o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+    public void tightMarshalLong2(OpenWireFormat wireFormat, long o, DataOutput dataOut, BooleanStream bs) throws IOException {
         if( bs.readBoolean() ) {
             if( bs.readBoolean() ) {
                 dataOut.writeLong(o);
@@ -86,7 +86,7 @@
             }
         }
     }
-    public long tightUnmarshalLong(OpenWireFormat wireFormat, DataInputStream dataIn, BooleanStream bs) throws IOException {
+    public long tightUnmarshalLong(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs) throws IOException {
         if( bs.readBoolean() ) {
             if( bs.readBoolean() ) {
                 return dataIn.readLong();
@@ -114,18 +114,18 @@
         return answer & 0xffffffffL;
     }
     
-    protected DataStructure tightUnmarsalNestedObject(OpenWireFormat wireFormat, DataInputStream dataIn, BooleanStream bs) throws IOException {
+    protected DataStructure tightUnmarsalNestedObject(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs) throws IOException {
         return wireFormat.tightUnmarshalNestedObject(dataIn, bs);
     }    
     protected int tightMarshalNestedObject1(OpenWireFormat wireFormat, DataStructure o, BooleanStream bs) throws IOException {
         return wireFormat.tightMarshalNestedObject1(o, bs);
     }
     
-    protected void tightMarshalNestedObject2(OpenWireFormat wireFormat, DataStructure o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+    protected void tightMarshalNestedObject2(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut, BooleanStream bs) throws IOException {
         wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
     }
 
-    protected DataStructure tightUnmarsalCachedObject(OpenWireFormat wireFormat, DataInputStream dataIn, BooleanStream bs) throws IOException {
+    protected DataStructure tightUnmarsalCachedObject(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs) throws IOException {
         if( wireFormat.isCacheEnabled() ) {
             if( bs.readBoolean() ) {
                 short index = dataIn.readShort();
@@ -155,7 +155,7 @@
             return wireFormat.tightMarshalNestedObject1(o, bs);
         }
     }    
-    protected void tightMarshalCachedObject2(OpenWireFormat wireFormat, DataStructure o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+    protected void tightMarshalCachedObject2(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut, BooleanStream bs) throws IOException {
         if( wireFormat.isCacheEnabled() ) {
             Short index = wireFormat.getMarshallCacheIndex(o);
             if( bs.readBoolean() ) {
@@ -169,7 +169,7 @@
         }
     }
     
-    protected Throwable tightUnmarsalThrowable(OpenWireFormat wireFormat, DataInputStream dataIn, BooleanStream bs) throws IOException {
+    protected Throwable tightUnmarsalThrowable(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs) throws IOException {
         if( bs.readBoolean() ) {
             String clazz =  tightUnmarshalString(dataIn, bs);
             String message = tightUnmarshalString(dataIn, bs);
@@ -244,7 +244,7 @@
         }
     }
     
-    protected void tightMarshalThrowable2(OpenWireFormat wireFormat, Throwable o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+    protected void tightMarshalThrowable2(OpenWireFormat wireFormat, Throwable o, DataOutput dataOut, BooleanStream bs) throws IOException {
         if( bs.readBoolean() ) {
             tightMarshalString2(o.getClass().getName(), dataOut, bs);
             tightMarshalString2(o.getMessage(), dataOut, bs);
@@ -263,7 +263,7 @@
         }
     }
     
-    protected String tightUnmarshalString(DataInputStream dataIn, BooleanStream bs) throws IOException {
+    protected String tightUnmarshalString(DataInput dataIn, BooleanStream bs) throws IOException {
         if( bs.readBoolean() ) {
             if( bs.readBoolean() ) {
                 int size = dataIn.readShort();
@@ -314,7 +314,7 @@
         }
     }
     
-    protected void tightMarshalString2(String value, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+    protected void tightMarshalString2(String value, DataOutput dataOut, BooleanStream bs) throws IOException {
         if( bs.readBoolean() ) {
             // If we verified it only holds ascii values
             if( bs.readBoolean() ) {
@@ -341,7 +341,7 @@
         }
     }
     
-    protected void tightMarshalObjectArray2(OpenWireFormat wireFormat, DataStructure[] objects, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+    protected void tightMarshalObjectArray2(OpenWireFormat wireFormat, DataStructure[] objects, DataOutput dataOut, BooleanStream bs) throws IOException {
         if( bs.readBoolean() ) {
             dataOut.writeShort(objects.length);
             for( int i=0; i < objects.length; i++ ) {
@@ -353,11 +353,11 @@
     protected int tightMarshalConstByteArray1(byte[] data, BooleanStream bs, int i) throws IOException {
         return i;
     }
-    protected void tightMarshalConstByteArray2(byte[] data, DataOutputStream dataOut, BooleanStream bs, int i) throws IOException {
+    protected void tightMarshalConstByteArray2(byte[] data, DataOutput dataOut, BooleanStream bs, int i) throws IOException {
         dataOut.write(data, 0, i);
     }
 
-    protected byte[] tightUnmarshalConstByteArray(DataInputStream dataIn, BooleanStream bs, int i) throws IOException {
+    protected byte[] tightUnmarshalConstByteArray(DataInput dataIn, BooleanStream bs, int i) throws IOException {
         byte data[] = new byte[i];
         dataIn.readFully(data);
         return data;
@@ -372,14 +372,14 @@
         }
     }
     
-    protected void tightMarshalByteArray2(byte[] data, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+    protected void tightMarshalByteArray2(byte[] data, DataOutput dataOut, BooleanStream bs) throws IOException {
         if( bs.readBoolean() ){
             dataOut.writeInt(data.length);
             dataOut.write(data);
         }
     }
 
-    protected byte[] tightUnmarshalByteArray(DataInputStream dataIn, BooleanStream bs) throws IOException {
+    protected byte[] tightUnmarshalByteArray(DataInput dataIn, BooleanStream bs) throws IOException {
         byte rc[]=null;
         if( bs.readBoolean() ) {
             int size = dataIn.readInt();
@@ -398,14 +398,14 @@
         }
     }
     
-    protected void tightMarshalByteSequence2(ByteSequence data, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+    protected void tightMarshalByteSequence2(ByteSequence data, DataOutput dataOut, BooleanStream bs) throws IOException {
         if( bs.readBoolean() ){
             dataOut.writeInt(data.getLength());
             dataOut.write(data.getData(), data.getOffset(), data.getLength());
         }
     }
 
-    protected ByteSequence tightUnmarshalByteSequence(DataInputStream dataIn, BooleanStream bs) throws IOException {
+    protected ByteSequence tightUnmarshalByteSequence(DataInput dataIn, BooleanStream bs) throws IOException {
         ByteSequence rc=null;
         if( bs.readBoolean() ) {
             int size = dataIn.readInt();
@@ -420,26 +420,26 @@
     // The loose marshaling logic
     //
     
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {        
+    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {        
     }
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn) throws IOException {        
+    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {        
     }
     
-    public void looseMarshalLong(OpenWireFormat wireFormat, long o, DataOutputStream dataOut) throws IOException {
+    public void looseMarshalLong(OpenWireFormat wireFormat, long o, DataOutput dataOut) throws IOException {
         dataOut.writeLong(o);
     }
-    public long looseUnmarshalLong(OpenWireFormat wireFormat, DataInputStream dataIn) throws IOException {
+    public long looseUnmarshalLong(OpenWireFormat wireFormat, DataInput dataIn) throws IOException {
         return dataIn.readLong();
     }
     
-    protected DataStructure looseUnmarsalNestedObject(OpenWireFormat wireFormat, DataInputStream dataIn) throws IOException {
+    protected DataStructure looseUnmarsalNestedObject(OpenWireFormat wireFormat, DataInput dataIn) throws IOException {
         return wireFormat.looseUnmarshalNestedObject(dataIn);
     }    
-    protected void looseMarshalNestedObject(OpenWireFormat wireFormat, DataStructure o, DataOutputStream dataOut) throws IOException {
+    protected void looseMarshalNestedObject(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut) throws IOException {
         wireFormat.looseMarshalNestedObject(o, dataOut);
     }
 
-    protected DataStructure looseUnmarsalCachedObject(OpenWireFormat wireFormat, DataInputStream dataIn) throws IOException {
+    protected DataStructure looseUnmarsalCachedObject(OpenWireFormat wireFormat, DataInput dataIn) throws IOException {
         if( wireFormat.isCacheEnabled() ) {
             if( dataIn.readBoolean() ) {
                 short index = dataIn.readShort();
@@ -454,7 +454,7 @@
             return wireFormat.looseUnmarshalNestedObject(dataIn);
         }
     }    
-    protected void looseMarshalCachedObject(OpenWireFormat wireFormat, DataStructure o, DataOutputStream dataOut) throws IOException {
+    protected void looseMarshalCachedObject(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut) throws IOException {
         if( wireFormat.isCacheEnabled() ) {
             Short index = wireFormat.getMarshallCacheIndex(o);
             dataOut.writeBoolean(index == null);
@@ -470,7 +470,7 @@
         }
     }
     
-    protected Throwable looseUnmarsalThrowable(OpenWireFormat wireFormat, DataInputStream dataIn) throws IOException {
+    protected Throwable looseUnmarsalThrowable(OpenWireFormat wireFormat, DataInput dataIn) throws IOException {
         if( dataIn.readBoolean() ) {
             String clazz =  looseUnmarshalString(dataIn);
             String message = looseUnmarshalString(dataIn);
@@ -511,7 +511,7 @@
     }
         
     
-    protected void looseMarshalThrowable(OpenWireFormat wireFormat, Throwable o, DataOutputStream dataOut) throws IOException {
+    protected void looseMarshalThrowable(OpenWireFormat wireFormat, Throwable o, DataOutput dataOut) throws IOException {
         dataOut.writeBoolean(o!=null);
         if( o!=null ) {
             looseMarshalString(o.getClass().getName(), dataOut);
@@ -531,7 +531,7 @@
         }
     }
     
-    protected String looseUnmarshalString(DataInputStream dataIn) throws IOException {
+    protected String looseUnmarshalString(DataInput dataIn) throws IOException {
         if( dataIn.readBoolean() ) {
             return dataIn.readUTF();
         } else {
@@ -539,14 +539,14 @@
         }
     }
     
-    protected void looseMarshalString(String value, DataOutputStream dataOut) throws IOException {
+    protected void looseMarshalString(String value, DataOutput dataOut) throws IOException {
         dataOut.writeBoolean(value!=null);
         if( value!=null ) {
             dataOut.writeUTF(value);                
         }
     }  
     
-    protected void looseMarshalObjectArray(OpenWireFormat wireFormat, DataStructure[] objects, DataOutputStream dataOut) throws IOException {
+    protected void looseMarshalObjectArray(OpenWireFormat wireFormat, DataStructure[] objects, DataOutput dataOut) throws IOException {
         dataOut.writeBoolean(objects!=null);
         if( objects!=null ) {
             dataOut.writeShort(objects.length);
@@ -556,17 +556,17 @@
         }
     }
     
-    protected void looseMarshalConstByteArray(OpenWireFormat wireFormat, byte[] data, DataOutputStream dataOut, int i) throws IOException {
+    protected void looseMarshalConstByteArray(OpenWireFormat wireFormat, byte[] data, DataOutput dataOut, int i) throws IOException {
         dataOut.write(data, 0, i);
     }
 
-    protected byte[] looseUnmarshalConstByteArray(DataInputStream dataIn, int i) throws IOException {
+    protected byte[] looseUnmarshalConstByteArray(DataInput dataIn, int i) throws IOException {
         byte data[] = new byte[i];
         dataIn.readFully(data);
         return data;
     }
 
-    protected void looseMarshalByteArray(OpenWireFormat wireFormat, byte[] data, DataOutputStream dataOut) throws IOException {
+    protected void looseMarshalByteArray(OpenWireFormat wireFormat, byte[] data, DataOutput dataOut) throws IOException {
         dataOut.writeBoolean(data!=null);
         if( data!=null ){
             dataOut.writeInt(data.length);
@@ -574,7 +574,7 @@
         }
     }
 
-    protected byte[] looseUnmarshalByteArray(DataInputStream dataIn) throws IOException {
+    protected byte[] looseUnmarshalByteArray(DataInput dataIn) throws IOException {
         byte rc[]=null;
         if( dataIn.readBoolean() ) {
             int size = dataIn.readInt();
@@ -584,7 +584,7 @@
         return rc;
     }
 
-    protected void looseMarshalByteSequence(OpenWireFormat wireFormat, ByteSequence data, DataOutputStream dataOut) throws IOException {
+    protected void looseMarshalByteSequence(OpenWireFormat wireFormat, ByteSequence data, DataOutput dataOut) throws IOException {
         dataOut.writeBoolean(data!=null);
         if( data!=null ){
             dataOut.writeInt(data.getLength());
@@ -592,7 +592,7 @@
         }
     }
 
-    protected ByteSequence looseUnmarshalByteSequence(DataInputStream dataIn) throws IOException {
+    protected ByteSequence looseUnmarshalByteSequence(DataInput dataIn) throws IOException {
         ByteSequence rc=null;
         if( dataIn.readBoolean() ) {
             int size = dataIn.readInt();

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerIdMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerIdMarshaller.java?view=diff&rev=470398&r1=470397&r2=470398
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerIdMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerIdMarshaller.java Thu Nov  2 07:49:58 2006
@@ -18,8 +18,8 @@
 
 package org.apache.activemq.openwire.v1;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
+import java.io.DataInput;
+import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.activemq.openwire.*;
@@ -62,7 +62,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
         super.tightUnmarshal(wireFormat, o, dataIn, bs);
 
         BrokerId info = (BrokerId)o;
@@ -91,7 +91,7 @@
      * @param dataOut the output stream
      * @throws IOException thrown if an error occurs
      */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
         super.tightMarshal2(wireFormat, o, dataOut, bs);
 
         BrokerId info = (BrokerId)o;
@@ -106,7 +106,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn) throws IOException {
+    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
         super.looseUnmarshal(wireFormat, o, dataIn);
 
         BrokerId info = (BrokerId)o;
@@ -118,7 +118,7 @@
     /**
      * Write the booleans that this object uses to a BooleanStream
      */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
 
         BrokerId info = (BrokerId)o;
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerInfoMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerInfoMarshaller.java?view=diff&rev=470398&r1=470397&r2=470398
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerInfoMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerInfoMarshaller.java Thu Nov  2 07:49:58 2006
@@ -18,8 +18,8 @@
 
 package org.apache.activemq.openwire.v1;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
+import java.io.DataInput;
+import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.activemq.openwire.*;
@@ -62,7 +62,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
         super.tightUnmarshal(wireFormat, o, dataIn, bs);
 
         BrokerInfo info = (BrokerInfo)o;
@@ -114,7 +114,7 @@
      * @param dataOut the output stream
      * @throws IOException thrown if an error occurs
      */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
         super.tightMarshal2(wireFormat, o, dataOut, bs);
 
         BrokerInfo info = (BrokerInfo)o;
@@ -135,7 +135,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn) throws IOException {
+    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
         super.looseUnmarshal(wireFormat, o, dataIn);
 
         BrokerInfo info = (BrokerInfo)o;
@@ -164,7 +164,7 @@
     /**
      * Write the booleans that this object uses to a BooleanStream
      */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
 
         BrokerInfo info = (BrokerInfo)o;
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionControlMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionControlMarshaller.java?view=diff&rev=470398&r1=470397&r2=470398
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionControlMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionControlMarshaller.java Thu Nov  2 07:49:58 2006
@@ -18,8 +18,8 @@
 
 package org.apache.activemq.openwire.v1;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
+import java.io.DataInput;
+import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.activemq.openwire.*;
@@ -62,7 +62,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
         super.tightUnmarshal(wireFormat, o, dataIn, bs);
 
         ConnectionControl info = (ConnectionControl)o;
@@ -99,7 +99,7 @@
      * @param dataOut the output stream
      * @throws IOException thrown if an error occurs
      */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
         super.tightMarshal2(wireFormat, o, dataOut, bs);
 
         ConnectionControl info = (ConnectionControl)o;
@@ -118,7 +118,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn) throws IOException {
+    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
         super.looseUnmarshal(wireFormat, o, dataIn);
 
         ConnectionControl info = (ConnectionControl)o;
@@ -134,7 +134,7 @@
     /**
      * Write the booleans that this object uses to a BooleanStream
      */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
 
         ConnectionControl info = (ConnectionControl)o;
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionErrorMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionErrorMarshaller.java?view=diff&rev=470398&r1=470397&r2=470398
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionErrorMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionErrorMarshaller.java Thu Nov  2 07:49:58 2006
@@ -18,8 +18,8 @@
 
 package org.apache.activemq.openwire.v1;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
+import java.io.DataInput;
+import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.activemq.openwire.*;
@@ -62,7 +62,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
         super.tightUnmarshal(wireFormat, o, dataIn, bs);
 
         ConnectionError info = (ConnectionError)o;
@@ -93,7 +93,7 @@
      * @param dataOut the output stream
      * @throws IOException thrown if an error occurs
      */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
         super.tightMarshal2(wireFormat, o, dataOut, bs);
 
         ConnectionError info = (ConnectionError)o;
@@ -109,7 +109,7 @@
      * @param dataIn the data input stream to build the object from
      * @throws IOException
      */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn) throws IOException {
+    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
         super.looseUnmarshal(wireFormat, o, dataIn);
 
         ConnectionError info = (ConnectionError)o;
@@ -122,7 +122,7 @@
     /**
      * Write the booleans that this object uses to a BooleanStream
      */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
 
         ConnectionError info = (ConnectionError)o;