activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r789377 [2/4] - in /activemq/sandbox/activemq-flow: activemq-broker/src/main/java/org/apache/activemq/apollo/broker/ activemq-broker/src/main/java/org/apache/activemq/apollo/broker/path/ activemq-broker/src/main/java/org/apache/activemq/apo...
Date Mon, 29 Jun 2009 16:28:56 GMT
Modified: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/Message.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/Message.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/Message.java (original)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/Message.java Mon Jun 29 16:28:18 2009
@@ -29,10 +29,10 @@
 import org.apache.activemq.broker.region.Destination;
 import org.apache.activemq.broker.region.MessageReference;
 import org.apache.activemq.legacy.usage.MemoryUsage;
-import org.apache.activemq.util.ByteArrayInputStream;
-import org.apache.activemq.util.ByteArrayOutputStream;
-import org.apache.activemq.util.ByteSequence;
 import org.apache.activemq.util.MarshallingSupport;
+import org.apache.activemq.util.buffer.Buffer;
+import org.apache.activemq.util.buffer.ByteArrayInputStream;
+import org.apache.activemq.util.buffer.ByteArrayOutputStream;
 import org.apache.activemq.wireformat.WireFormat;
 
 /**
@@ -72,8 +72,8 @@
     protected boolean compressed;
     protected String userID;
 
-    protected ByteSequence content;
-    protected ByteSequence marshalledProperties;
+    protected Buffer content;
+    protected Buffer marshalledProperties;
     protected DataStructure dataStructure;
     protected int redeliveryCounter;
 
@@ -185,7 +185,7 @@
         }
     }
 
-    private Map<String, Object> unmarsallProperties(ByteSequence marshalledProperties) throws IOException {
+    private Map<String, Object> unmarsallProperties(Buffer marshalledProperties) throws IOException {
         return MarshallingSupport.unmarshalPrimitiveMap(new DataInputStream(new ByteArrayInputStream(marshalledProperties)));
     }
 
@@ -387,22 +387,22 @@
     /**
      * @openwire:property version=1
      */
-    public ByteSequence getContent() {
+    public Buffer getContent() {
         return content;
     }
 
-    public void setContent(ByteSequence content) {
+    public void setContent(Buffer content) {
         this.content = content;
     }
 
     /**
      * @openwire:property version=1
      */
-    public ByteSequence getMarshalledProperties() {
+    public Buffer getMarshalledProperties() {
         return marshalledProperties;
     }
 
-    public void setMarshalledProperties(ByteSequence marshalledProperties) {
+    public void setMarshalledProperties(Buffer marshalledProperties) {
         this.marshalledProperties = marshalledProperties;
     }
 

Modified: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/WireFormatInfo.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/WireFormatInfo.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/WireFormatInfo.java (original)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/WireFormatInfo.java Mon Jun 29 16:28:18 2009
@@ -25,10 +25,10 @@
 import java.util.Map;
 
 import org.apache.activemq.state.CommandVisitor;
-import org.apache.activemq.util.ByteArrayInputStream;
-import org.apache.activemq.util.ByteArrayOutputStream;
-import org.apache.activemq.util.ByteSequence;
 import org.apache.activemq.util.MarshallingSupport;
+import org.apache.activemq.util.buffer.Buffer;
+import org.apache.activemq.util.buffer.ByteArrayInputStream;
+import org.apache.activemq.util.buffer.ByteArrayOutputStream;
 import org.apache.activemq.wireformat.WireFormat;
 
 /**
@@ -43,7 +43,7 @@
 
     protected byte magic[] = MAGIC;
     protected int version;
-    protected ByteSequence marshalledProperties;
+    protected Buffer marshalledProperties;
 
     protected transient Map<String, Object> properties;
     private transient Endpoint from;
@@ -86,11 +86,11 @@
     /**
      * @openwire:property version=1
      */
-    public ByteSequence getMarshalledProperties() {
+    public Buffer getMarshalledProperties() {
         return marshalledProperties;
     }
 
-    public void setMarshalledProperties(ByteSequence marshalledProperties) {
+    public void setMarshalledProperties(Buffer marshalledProperties) {
         this.marshalledProperties = marshalledProperties;
     }
 
@@ -165,7 +165,7 @@
         }
     }
 
-    private Map<String, Object> unmarsallProperties(ByteSequence marshalledProperties) throws IOException {
+    private Map<String, Object> unmarsallProperties(Buffer marshalledProperties) throws IOException {
         return MarshallingSupport.unmarshalPrimitiveMap(new DataInputStream(new ByteArrayInputStream(marshalledProperties)), MAX_PROPERTY_SIZE);
     }
 
@@ -357,10 +357,10 @@
         return false;
     }
 
-    public void setCachedMarshalledForm(WireFormat wireFormat, ByteSequence data) {
+    public void setCachedMarshalledForm(WireFormat wireFormat, Buffer data) {
     }
 
-    public ByteSequence getCachedMarshalledForm(WireFormat wireFormat) {
+    public Buffer getCachedMarshalledForm(WireFormat wireFormat) {
         return null;
     }
 

Modified: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java (original)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java Mon Jun 29 16:28:18 2009
@@ -31,10 +31,10 @@
 import org.apache.activemq.transport.ResponseCorrelator;
 import org.apache.activemq.transport.Transport;
 import org.apache.activemq.transport.WireFormatNegotiator;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.ByteSequenceData;
-import org.apache.activemq.util.DataByteArrayInputStream;
-import org.apache.activemq.util.DataByteArrayOutputStream;
+import org.apache.activemq.util.buffer.Buffer;
+import org.apache.activemq.util.buffer.BufferEditor;
+import org.apache.activemq.util.buffer.DataByteArrayInputStream;
+import org.apache.activemq.util.buffer.DataByteArrayOutputStream;
 import org.apache.activemq.wireformat.WireFormat;
 import org.apache.activemq.wireformat.WireFormatFactory;
 
@@ -120,7 +120,7 @@
         return WIREFORMAT_NAME;
     }
 
-    public synchronized ByteSequence marshal(Object command) throws IOException {
+    public synchronized Buffer marshal(Object command) throws IOException {
 
         if (cacheEnabled) {
             runMarshallCacheEvictionSweep();
@@ -133,7 +133,7 @@
         //            ma = (MarshallAware)command;
         //        }
 
-        ByteSequence sequence = null;
+        Buffer sequence = null;
         // if( ma!=null ) {
         // sequence = ma.getCachedMarshalledForm(this);
         // }
@@ -178,7 +178,7 @@
                     if (!sizePrefixDisabled) {
                         size = sequence.getLength() - 4;
                         int pos = sequence.offset;
-                        ByteSequenceData.writeIntBig(sequence, size);
+                        BufferEditor.writeIntBig(sequence, size);
                         sequence.offset = pos;
                     }
                 }
@@ -197,7 +197,7 @@
         return sequence;
     }
 
-    public synchronized Object unmarshal(ByteSequence sequence) throws IOException {
+    public synchronized Object unmarshal(Buffer sequence) throws IOException {
         bytesIn.restart(sequence);
         // DataInputStream dis = new DataInputStream(new
         // ByteArrayInputStream(sequence));
@@ -257,7 +257,7 @@
                 dsm.looseMarshal(this, c, looseOut);
 
                 if (!sizePrefixDisabled) {
-                    ByteSequence sequence = bytesOut.toByteSequence();
+                    Buffer sequence = bytesOut.toByteSequence();
                     dataOut.writeInt(sequence.getLength());
                     dataOut.write(sequence.getData(), sequence.getOffset(), sequence.getLength());
                 }
@@ -385,7 +385,7 @@
 
         if (o.isMarshallAware()) {
             // MarshallAware ma = (MarshallAware)o;
-            ByteSequence sequence = null;
+            Buffer sequence = null;
             // sequence=ma.getCachedMarshalledForm(this);
             bs.writeBoolean(sequence != null);
             if (sequence != null) {

Modified: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java (original)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java Mon Jun 29 16:28:18 2009
@@ -17,7 +17,7 @@
 package org.apache.activemq.openwire;
 
 import org.apache.activemq.command.WireFormatInfo;
-import org.apache.activemq.util.ByteSequence;
+import org.apache.activemq.util.buffer.Buffer;
 import org.apache.activemq.wireformat.WireFormat;
 import org.apache.activemq.wireformat.WireFormatFactory;
 
@@ -148,7 +148,7 @@
     /* (non-Javadoc)
      * @see org.apache.activemq.wireformat.WireFormatFactory#matchesWireformatHeader(org.apache.activemq.util.ByteSequence)
      */
-    public boolean matchesWireformatHeader(ByteSequence byteSequence) {
+    public boolean matchesWireformatHeader(Buffer byteSequence) {
         throw new UnsupportedOperationException();
     }
 

Modified: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/BaseDataStreamMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/BaseDataStreamMarshaller.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/BaseDataStreamMarshaller.java (original)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/BaseDataStreamMarshaller.java Mon Jun 29 16:28:18 2009
@@ -25,7 +25,7 @@
 import org.apache.activemq.openwire.BooleanStream;
 import org.apache.activemq.openwire.DataStreamMarshaller;
 import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.util.ByteSequence;
+import org.apache.activemq.util.buffer.Buffer;
 
 public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
 
@@ -416,7 +416,7 @@
         return rc;
     }
 
-    protected int tightMarshalByteSequence1(ByteSequence data, BooleanStream bs) throws IOException {
+    protected int tightMarshalByteSequence1(Buffer data, BooleanStream bs) throws IOException {
         bs.writeBoolean(data != null);
         if (data != null) {
             return data.getLength() + 4;
@@ -425,7 +425,7 @@
         }
     }
 
-    protected void tightMarshalByteSequence2(ByteSequence data, DataOutput dataOut, BooleanStream bs)
+    protected void tightMarshalByteSequence2(Buffer data, DataOutput dataOut, BooleanStream bs)
         throws IOException {
         if (bs.readBoolean()) {
             dataOut.writeInt(data.getLength());
@@ -433,13 +433,13 @@
         }
     }
 
-    protected ByteSequence tightUnmarshalByteSequence(DataInput dataIn, BooleanStream bs) throws IOException {
-        ByteSequence rc = null;
+    protected Buffer tightUnmarshalByteSequence(DataInput dataIn, BooleanStream bs) throws IOException {
+        Buffer rc = null;
         if (bs.readBoolean()) {
             int size = dataIn.readInt();
             byte[] t = new byte[size];
             dataIn.readFully(t);
-            return new ByteSequence(t, 0, size);
+            return new Buffer(t, 0, size);
         }
         return rc;
     }
@@ -623,7 +623,7 @@
         return rc;
     }
 
-    protected void looseMarshalByteSequence(OpenWireFormat wireFormat, ByteSequence data, DataOutput dataOut)
+    protected void looseMarshalByteSequence(OpenWireFormat wireFormat, Buffer data, DataOutput dataOut)
         throws IOException {
         dataOut.writeBoolean(data != null);
         if (data != null) {
@@ -632,13 +632,13 @@
         }
     }
 
-    protected ByteSequence looseUnmarshalByteSequence(DataInput dataIn) throws IOException {
-        ByteSequence rc = null;
+    protected Buffer looseUnmarshalByteSequence(DataInput dataIn) throws IOException {
+        Buffer rc = null;
         if (dataIn.readBoolean()) {
             int size = dataIn.readInt();
             byte[] t = new byte[size];
             dataIn.readFully(t);
-            rc = new ByteSequence(t, 0, size);
+            rc = new Buffer(t, 0, size);
         }
         return rc;
     }

Modified: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v2/BaseDataStreamMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v2/BaseDataStreamMarshaller.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v2/BaseDataStreamMarshaller.java (original)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v2/BaseDataStreamMarshaller.java Mon Jun 29 16:28:18 2009
@@ -25,7 +25,7 @@
 import org.apache.activemq.openwire.BooleanStream;
 import org.apache.activemq.openwire.DataStreamMarshaller;
 import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.util.ByteSequence;
+import org.apache.activemq.util.buffer.Buffer;
 
 public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
 
@@ -416,7 +416,7 @@
         return rc;
     }
 
-    protected int tightMarshalByteSequence1(ByteSequence data, BooleanStream bs) throws IOException {
+    protected int tightMarshalByteSequence1(Buffer data, BooleanStream bs) throws IOException {
         bs.writeBoolean(data != null);
         if (data != null) {
             return data.getLength() + 4;
@@ -425,7 +425,7 @@
         }
     }
 
-    protected void tightMarshalByteSequence2(ByteSequence data, DataOutput dataOut, BooleanStream bs)
+    protected void tightMarshalByteSequence2(Buffer data, DataOutput dataOut, BooleanStream bs)
         throws IOException {
         if (bs.readBoolean()) {
             dataOut.writeInt(data.getLength());
@@ -433,13 +433,13 @@
         }
     }
 
-    protected ByteSequence tightUnmarshalByteSequence(DataInput dataIn, BooleanStream bs) throws IOException {
-        ByteSequence rc = null;
+    protected Buffer tightUnmarshalByteSequence(DataInput dataIn, BooleanStream bs) throws IOException {
+        Buffer rc = null;
         if (bs.readBoolean()) {
             int size = dataIn.readInt();
             byte[] t = new byte[size];
             dataIn.readFully(t);
-            return new ByteSequence(t, 0, size);
+            return new Buffer(t, 0, size);
         }
         return rc;
     }
@@ -623,7 +623,7 @@
         return rc;
     }
 
-    protected void looseMarshalByteSequence(OpenWireFormat wireFormat, ByteSequence data, DataOutput dataOut)
+    protected void looseMarshalByteSequence(OpenWireFormat wireFormat, Buffer data, DataOutput dataOut)
         throws IOException {
         dataOut.writeBoolean(data != null);
         if (data != null) {
@@ -632,13 +632,13 @@
         }
     }
 
-    protected ByteSequence looseUnmarshalByteSequence(DataInput dataIn) throws IOException {
-        ByteSequence rc = null;
+    protected Buffer looseUnmarshalByteSequence(DataInput dataIn) throws IOException {
+        Buffer rc = null;
         if (dataIn.readBoolean()) {
             int size = dataIn.readInt();
             byte[] t = new byte[size];
             dataIn.readFully(t);
-            rc = new ByteSequence(t, 0, size);
+            rc = new Buffer(t, 0, size);
         }
         return rc;
     }

Modified: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v3/BaseDataStreamMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v3/BaseDataStreamMarshaller.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v3/BaseDataStreamMarshaller.java (original)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v3/BaseDataStreamMarshaller.java Mon Jun 29 16:28:18 2009
@@ -25,7 +25,7 @@
 import org.apache.activemq.openwire.BooleanStream;
 import org.apache.activemq.openwire.DataStreamMarshaller;
 import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.util.ByteSequence;
+import org.apache.activemq.util.buffer.Buffer;
 
 public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
 
@@ -416,7 +416,7 @@
         return rc;
     }
 
-    protected int tightMarshalByteSequence1(ByteSequence data, BooleanStream bs) throws IOException {
+    protected int tightMarshalByteSequence1(Buffer data, BooleanStream bs) throws IOException {
         bs.writeBoolean(data != null);
         if (data != null) {
             return data.getLength() + 4;
@@ -425,7 +425,7 @@
         }
     }
 
-    protected void tightMarshalByteSequence2(ByteSequence data, DataOutput dataOut, BooleanStream bs)
+    protected void tightMarshalByteSequence2(Buffer data, DataOutput dataOut, BooleanStream bs)
         throws IOException {
         if (bs.readBoolean()) {
             dataOut.writeInt(data.getLength());
@@ -433,13 +433,13 @@
         }
     }
 
-    protected ByteSequence tightUnmarshalByteSequence(DataInput dataIn, BooleanStream bs) throws IOException {
-        ByteSequence rc = null;
+    protected Buffer tightUnmarshalByteSequence(DataInput dataIn, BooleanStream bs) throws IOException {
+        Buffer rc = null;
         if (bs.readBoolean()) {
             int size = dataIn.readInt();
             byte[] t = new byte[size];
             dataIn.readFully(t);
-            return new ByteSequence(t, 0, size);
+            return new Buffer(t, 0, size);
         }
         return rc;
     }
@@ -623,7 +623,7 @@
         return rc;
     }
 
-    protected void looseMarshalByteSequence(OpenWireFormat wireFormat, ByteSequence data, DataOutput dataOut)
+    protected void looseMarshalByteSequence(OpenWireFormat wireFormat, Buffer data, DataOutput dataOut)
         throws IOException {
         dataOut.writeBoolean(data != null);
         if (data != null) {
@@ -632,13 +632,13 @@
         }
     }
 
-    protected ByteSequence looseUnmarshalByteSequence(DataInput dataIn) throws IOException {
-        ByteSequence rc = null;
+    protected Buffer looseUnmarshalByteSequence(DataInput dataIn) throws IOException {
+        Buffer rc = null;
         if (dataIn.readBoolean()) {
             int size = dataIn.readInt();
             byte[] t = new byte[size];
             dataIn.readFully(t);
-            rc = new ByteSequence(t, 0, size);
+            rc = new Buffer(t, 0, size);
         }
         return rc;
     }

Modified: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v4/BaseDataStreamMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v4/BaseDataStreamMarshaller.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v4/BaseDataStreamMarshaller.java (original)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v4/BaseDataStreamMarshaller.java Mon Jun 29 16:28:18 2009
@@ -25,7 +25,7 @@
 import org.apache.activemq.openwire.BooleanStream;
 import org.apache.activemq.openwire.DataStreamMarshaller;
 import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.util.ByteSequence;
+import org.apache.activemq.util.buffer.Buffer;
 
 public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
 
@@ -416,7 +416,7 @@
         return rc;
     }
 
-    protected int tightMarshalByteSequence1(ByteSequence data, BooleanStream bs) throws IOException {
+    protected int tightMarshalByteSequence1(Buffer data, BooleanStream bs) throws IOException {
         bs.writeBoolean(data != null);
         if (data != null) {
             return data.getLength() + 4;
@@ -425,7 +425,7 @@
         }
     }
 
-    protected void tightMarshalByteSequence2(ByteSequence data, DataOutput dataOut, BooleanStream bs)
+    protected void tightMarshalByteSequence2(Buffer data, DataOutput dataOut, BooleanStream bs)
         throws IOException {
         if (bs.readBoolean()) {
             dataOut.writeInt(data.getLength());
@@ -433,13 +433,13 @@
         }
     }
 
-    protected ByteSequence tightUnmarshalByteSequence(DataInput dataIn, BooleanStream bs) throws IOException {
-        ByteSequence rc = null;
+    protected Buffer tightUnmarshalByteSequence(DataInput dataIn, BooleanStream bs) throws IOException {
+        Buffer rc = null;
         if (bs.readBoolean()) {
             int size = dataIn.readInt();
             byte[] t = new byte[size];
             dataIn.readFully(t);
-            return new ByteSequence(t, 0, size);
+            return new Buffer(t, 0, size);
         }
         return rc;
     }
@@ -623,7 +623,7 @@
         return rc;
     }
 
-    protected void looseMarshalByteSequence(OpenWireFormat wireFormat, ByteSequence data, DataOutput dataOut)
+    protected void looseMarshalByteSequence(OpenWireFormat wireFormat, Buffer data, DataOutput dataOut)
         throws IOException {
         dataOut.writeBoolean(data != null);
         if (data != null) {
@@ -632,13 +632,13 @@
         }
     }
 
-    protected ByteSequence looseUnmarshalByteSequence(DataInput dataIn) throws IOException {
-        ByteSequence rc = null;
+    protected Buffer looseUnmarshalByteSequence(DataInput dataIn) throws IOException {
+        Buffer rc = null;
         if (dataIn.readBoolean()) {
             int size = dataIn.readInt();
             byte[] t = new byte[size];
             dataIn.readFully(t);
-            rc = new ByteSequence(t, 0, size);
+            rc = new Buffer(t, 0, size);
         }
         return rc;
     }

Modified: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v5/BaseDataStreamMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v5/BaseDataStreamMarshaller.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v5/BaseDataStreamMarshaller.java (original)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v5/BaseDataStreamMarshaller.java Mon Jun 29 16:28:18 2009
@@ -25,7 +25,7 @@
 import org.apache.activemq.openwire.BooleanStream;
 import org.apache.activemq.openwire.DataStreamMarshaller;
 import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.util.ByteSequence;
+import org.apache.activemq.util.buffer.Buffer;
 
 public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
 
@@ -416,7 +416,7 @@
         return rc;
     }
 
-    protected int tightMarshalByteSequence1(ByteSequence data, BooleanStream bs) throws IOException {
+    protected int tightMarshalByteSequence1(Buffer data, BooleanStream bs) throws IOException {
         bs.writeBoolean(data != null);
         if (data != null) {
             return data.getLength() + 4;
@@ -425,7 +425,7 @@
         }
     }
 
-    protected void tightMarshalByteSequence2(ByteSequence data, DataOutput dataOut, BooleanStream bs)
+    protected void tightMarshalByteSequence2(Buffer data, DataOutput dataOut, BooleanStream bs)
         throws IOException {
         if (bs.readBoolean()) {
             dataOut.writeInt(data.getLength());
@@ -433,13 +433,13 @@
         }
     }
 
-    protected ByteSequence tightUnmarshalByteSequence(DataInput dataIn, BooleanStream bs) throws IOException {
-        ByteSequence rc = null;
+    protected Buffer tightUnmarshalByteSequence(DataInput dataIn, BooleanStream bs) throws IOException {
+        Buffer rc = null;
         if (bs.readBoolean()) {
             int size = dataIn.readInt();
             byte[] t = new byte[size];
             dataIn.readFully(t);
-            return new ByteSequence(t, 0, size);
+            return new Buffer(t, 0, size);
         }
         return rc;
     }
@@ -623,7 +623,7 @@
         return rc;
     }
 
-    protected void looseMarshalByteSequence(OpenWireFormat wireFormat, ByteSequence data, DataOutput dataOut)
+    protected void looseMarshalByteSequence(OpenWireFormat wireFormat, Buffer data, DataOutput dataOut)
         throws IOException {
         dataOut.writeBoolean(data != null);
         if (data != null) {
@@ -632,13 +632,13 @@
         }
     }
 
-    protected ByteSequence looseUnmarshalByteSequence(DataInput dataIn) throws IOException {
-        ByteSequence rc = null;
+    protected Buffer looseUnmarshalByteSequence(DataInput dataIn) throws IOException {
+        Buffer rc = null;
         if (dataIn.readBoolean()) {
             int size = dataIn.readInt();
             byte[] t = new byte[size];
             dataIn.readFully(t);
-            rc = new ByteSequence(t, 0, size);
+            rc = new Buffer(t, 0, size);
         }
         return rc;
     }

Modified: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/util/MarshallingSupport.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/util/MarshallingSupport.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/util/MarshallingSupport.java (original)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/util/MarshallingSupport.java Mon Jun 29 16:28:18 2009
@@ -29,6 +29,9 @@
 import java.util.Map;
 import java.util.Properties;
 
+import org.apache.activemq.util.buffer.DataByteArrayInputStream;
+import org.apache.activemq.util.buffer.DataByteArrayOutputStream;
+
 /**
  * The fixed version of the UTF8 encoding function. Some older JVM's UTF8
  * encoding function breaks when handling large strings.

Modified: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/wireformat/DiscriminatableOpenWireFormatFactory.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/wireformat/DiscriminatableOpenWireFormatFactory.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/wireformat/DiscriminatableOpenWireFormatFactory.java (original)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/wireformat/DiscriminatableOpenWireFormatFactory.java Mon Jun 29 16:28:18 2009
@@ -17,7 +17,7 @@
 package org.apache.activemq.wireformat;
 
 import org.apache.activemq.openwire.OpenWireFormatFactory;
-import org.apache.activemq.util.ByteSequence;
+import org.apache.activemq.util.buffer.Buffer;
 
 public class DiscriminatableOpenWireFormatFactory extends OpenWireFormatFactory {
 
@@ -27,7 +27,7 @@
         return true;
     }
 
-    public boolean matchesWireformatHeader(ByteSequence byteSequence) {
+    public boolean matchesWireformatHeader(Buffer byteSequence) {
         if (byteSequence.length == 4 + MAGIC.length) {
             for (int i = 0; i < MAGIC.length; i++) {
                 if (byteSequence.data[i + 4] != MAGIC[i]) {

Modified: activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/DataFileGeneratorTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/DataFileGeneratorTestSupport.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/DataFileGeneratorTestSupport.java (original)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/DataFileGeneratorTestSupport.java Mon Jun 29 16:28:18 2009
@@ -57,7 +57,7 @@
 import org.apache.activemq.openwire.v1.ActiveMQTextMessageTest;
 import org.apache.activemq.openwire.v1.BrokerInfoTest;
 import org.apache.activemq.openwire.v1.MessageAckTest;
-import org.apache.activemq.util.ByteSequence;
+import org.apache.activemq.util.buffer.Buffer;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -148,8 +148,8 @@
         } else {
             if (expectedValue instanceof Exception) {
                 assertExceptionsEqual(message, (Exception)expectedValue, actualValue);
-            } else if (expectedValue instanceof ByteSequence) {
-                assertByteSequencesEqual(message, (ByteSequence)expectedValue, actualValue);
+            } else if (expectedValue instanceof Buffer) {
+                assertByteSequencesEqual(message, (Buffer)expectedValue, actualValue);
             } else if (expectedValue instanceof DataStructure) {
                 assertBeansEqual(message + name, comparedObjects, expectedValue, actualValue);
             } else if (expectedValue instanceof Enumeration) {
@@ -185,9 +185,9 @@
         }
     }
 
-    protected void assertByteSequencesEqual(String message, ByteSequence expected, Object actualValue) {
-        assertTrue(message + ". Actual value should be a ByteSequence but was: " + actualValue, actualValue instanceof ByteSequence);
-        ByteSequence actual = (ByteSequence)actualValue;
+    protected void assertByteSequencesEqual(String message, Buffer expected, Object actualValue) {
+        assertTrue(message + ". Actual value should be a ByteSequence but was: " + actualValue, actualValue instanceof Buffer);
+        Buffer actual = (Buffer)actualValue;
         int length = expected.getLength();
         assertEquals(message + ". Length", length, actual.getLength());
         int offset = expected.getOffset();

Modified: activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v1/MessageTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v1/MessageTestSupport.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v1/MessageTestSupport.java (original)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v1/MessageTestSupport.java Mon Jun 29 16:28:18 2009
@@ -23,8 +23,8 @@
 
 import org.apache.activemq.command.BrokerId;
 import org.apache.activemq.command.Message;
-import org.apache.activemq.util.ByteArrayOutputStream;
 import org.apache.activemq.util.MarshallingSupport;
+import org.apache.activemq.util.buffer.ByteArrayOutputStream;
 
 /**
  * Test case for the OpenWire marshalling for Message NOTE!: This file is auto

Modified: activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v1/WireFormatInfoTest.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v1/WireFormatInfoTest.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v1/WireFormatInfoTest.java (original)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v1/WireFormatInfoTest.java Mon Jun 29 16:28:18 2009
@@ -44,7 +44,7 @@
 
         {
             byte data[] = "MarshalledProperties:1".getBytes();
-            info.setMarshalledProperties(new org.apache.activemq.util.ByteSequence(data, 0, data.length));
+            info.setMarshalledProperties(new org.apache.activemq.util.buffer.Buffer(data, 0, data.length));
         }
 
     }

Modified: activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v2/MessageTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v2/MessageTestSupport.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v2/MessageTestSupport.java (original)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v2/MessageTestSupport.java Mon Jun 29 16:28:18 2009
@@ -22,8 +22,8 @@
 
 import org.apache.activemq.command.BrokerId;
 import org.apache.activemq.command.Message;
-import org.apache.activemq.util.ByteArrayOutputStream;
 import org.apache.activemq.util.MarshallingSupport;
+import org.apache.activemq.util.buffer.ByteArrayOutputStream;
 
 /**
  * Test case for the OpenWire marshalling for Message NOTE!: This file is auto

Modified: activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v2/WireFormatInfoTest.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v2/WireFormatInfoTest.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v2/WireFormatInfoTest.java (original)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v2/WireFormatInfoTest.java Mon Jun 29 16:28:18 2009
@@ -44,7 +44,7 @@
 
         {
             byte data[] = "MarshalledProperties:1".getBytes();
-            info.setMarshalledProperties(new org.apache.activemq.util.ByteSequence(data, 0, data.length));
+            info.setMarshalledProperties(new org.apache.activemq.util.buffer.Buffer(data, 0, data.length));
         }
 
     }

Modified: activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v3/MessageTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v3/MessageTestSupport.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v3/MessageTestSupport.java (original)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v3/MessageTestSupport.java Mon Jun 29 16:28:18 2009
@@ -50,11 +50,11 @@
         info.setType("Type:10");
         {
             byte data[] = "Content:11".getBytes();
-            info.setContent(new org.apache.activemq.util.ByteSequence(data, 0, data.length));
+            info.setContent(new org.apache.activemq.util.buffer.Buffer(data, 0, data.length));
         }
         {
             byte data[] = "MarshalledProperties:12".getBytes();
-            info.setMarshalledProperties(new org.apache.activemq.util.ByteSequence(data, 0, data.length));
+            info.setMarshalledProperties(new org.apache.activemq.util.buffer.Buffer(data, 0, data.length));
         }
         info.setDataStructure(createDataStructure("DataStructure:13"));
         info.setTargetConsumerId(createConsumerId("TargetConsumerId:14"));

Modified: activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v4/MessageTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v4/MessageTestSupport.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v4/MessageTestSupport.java (original)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v4/MessageTestSupport.java Mon Jun 29 16:28:18 2009
@@ -60,11 +60,11 @@
         info.setType("Type:10");
         {
             byte data[] = "Content:11".getBytes();
-            info.setContent(new org.apache.activemq.util.ByteSequence(data,0,data.length));
+            info.setContent(new org.apache.activemq.util.buffer.Buffer(data,0,data.length));
 }
         {
             byte data[] = "MarshalledProperties:12".getBytes();
-            info.setMarshalledProperties(new org.apache.activemq.util.ByteSequence(data,0,data.length));
+            info.setMarshalledProperties(new org.apache.activemq.util.buffer.Buffer(data,0,data.length));
 }
         info.setDataStructure(createDataStructure("DataStructure:13"));
         info.setTargetConsumerId(createConsumerId("TargetConsumerId:14"));

Modified: activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v5/MessageTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v5/MessageTestSupport.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v5/MessageTestSupport.java (original)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/openwire/v5/MessageTestSupport.java Mon Jun 29 16:28:18 2009
@@ -60,11 +60,11 @@
         info.setType("Type:10");
         {
             byte data[] = "Content:11".getBytes();
-            info.setContent(new org.apache.activemq.util.ByteSequence(data,0,data.length));
+            info.setContent(new org.apache.activemq.util.buffer.Buffer(data,0,data.length));
 }
         {
             byte data[] = "MarshalledProperties:12".getBytes();
-            info.setMarshalledProperties(new org.apache.activemq.util.ByteSequence(data,0,data.length));
+            info.setMarshalledProperties(new org.apache.activemq.util.buffer.Buffer(data,0,data.length));
 }
         info.setDataStructure(createDataStructure("DataStructure:13"));
         info.setTargetConsumerId(createConsumerId("TargetConsumerId:14"));

Modified: activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf-test/src/test/java/com/google/protobuf/TestUtil.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf-test/src/test/java/com/google/protobuf/TestUtil.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf-test/src/test/java/com/google/protobuf/TestUtil.java (original)
+++ activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf-test/src/test/java/com/google/protobuf/TestUtil.java Mon Jun 29 16:28:18 2009
@@ -28,7 +28,7 @@
 
 import junit.framework.Assert;
 
-import org.apache.activemq.protobuf.Buffer;
+import org.apache.activemq.util.buffer.Buffer;
 
 import protobuf_unittest.UnittestProto.ForeignEnum;
 import protobuf_unittest.UnittestProto.ForeignMessage;

Modified: activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf-test/src/test/java/com/google/protobuf/WireFormatTest.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf-test/src/test/java/com/google/protobuf/WireFormatTest.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf-test/src/test/java/com/google/protobuf/WireFormatTest.java (original)
+++ activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf-test/src/test/java/com/google/protobuf/WireFormatTest.java Mon Jun 29 16:28:18 2009
@@ -19,7 +19,7 @@
 import junit.framework.TestCase;
 
 import org.apache.activemq.protobuf.CodedInputStream;
-import org.apache.activemq.protobuf.Buffer;
+import org.apache.activemq.util.buffer.Buffer;
 
 import protobuf_unittest.UnittestProto.TestAllTypes;
 

Modified: activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/BaseMessage.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/BaseMessage.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/BaseMessage.java (original)
+++ activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/BaseMessage.java Mon Jun 29 16:28:18 2009
@@ -28,6 +28,9 @@
 import java.util.Collection;
 import java.util.List;
 
+import org.apache.activemq.util.buffer.Buffer;
+import org.apache.activemq.util.buffer.BufferOutputStream;
+
 
 abstract public class BaseMessage<T> implements Message<T> {
 

Modified: activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/CodedInputStream.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/CodedInputStream.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/CodedInputStream.java (original)
+++ activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/CodedInputStream.java Mon Jun 29 16:28:18 2009
@@ -21,6 +21,9 @@
 import java.io.IOException;
 import java.io.InputStream;
 
+import org.apache.activemq.util.buffer.Buffer;
+import org.apache.activemq.util.buffer.BufferInputStream;
+
 
 /**
  * Reads and decodes protocol message fields.

Modified: activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/CodedOutputStream.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/CodedOutputStream.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/CodedOutputStream.java (original)
+++ activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/CodedOutputStream.java Mon Jun 29 16:28:18 2009
@@ -19,6 +19,9 @@
 import java.io.IOException;
 import java.io.OutputStream;
 
+import org.apache.activemq.util.buffer.Buffer;
+import org.apache.activemq.util.buffer.BufferOutputStream;
+
 
 /**
  * Encodes and writes protocol message fields.

Modified: activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/DeferredDecodeMessage.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/DeferredDecodeMessage.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/DeferredDecodeMessage.java (original)
+++ activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/DeferredDecodeMessage.java Mon Jun 29 16:28:18 2009
@@ -18,6 +18,8 @@
 
 import java.io.IOException;
 
+import org.apache.activemq.util.buffer.Buffer;
+
 
 abstract public class DeferredDecodeMessage<T> extends BaseMessage<T> {
 

Modified: activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/Message.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/Message.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/Message.java (original)
+++ activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/Message.java Mon Jun 29 16:28:18 2009
@@ -20,6 +20,8 @@
 import java.io.InputStream;
 import java.io.OutputStream;
 
+import org.apache.activemq.util.buffer.Buffer;
+
 
 public interface Message<T> {
 

Modified: activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/MessageBuffer.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/MessageBuffer.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/MessageBuffer.java (original)
+++ activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/MessageBuffer.java Mon Jun 29 16:28:18 2009
@@ -3,6 +3,8 @@
 import java.io.IOException;
 import java.io.OutputStream;
 
+import org.apache.activemq.util.buffer.Buffer;
+
 
 public interface MessageBuffer<B, MB extends MessageBuffer> extends PBMessage<B, MB> {
    

Modified: activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/MessageBufferSupport.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/MessageBufferSupport.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/MessageBufferSupport.java (original)
+++ activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/MessageBufferSupport.java Mon Jun 29 16:28:18 2009
@@ -6,6 +6,9 @@
 import java.io.InputStream;
 import java.util.Collection;
 
+import org.apache.activemq.util.buffer.Buffer;
+import org.apache.activemq.util.buffer.BufferOutputStream;
+
 
 
 final public class MessageBufferSupport {

Modified: activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/compiler/AltJavaGenerator.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/compiler/AltJavaGenerator.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/compiler/AltJavaGenerator.java (original)
+++ activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/compiler/AltJavaGenerator.java Mon Jun 29 16:28:18 2009
@@ -364,11 +364,11 @@
         indent();
         
         p("private "+beanClassName+" bean;");
-        p("private org.apache.activemq.protobuf.Buffer buffer;");
+        p("private org.apache.activemq.util.buffer.Buffer buffer;");
         p("private int size=-1;");
         p("private int hashCode;");
         p();
-        p("private "+bufferClassName+"(org.apache.activemq.protobuf.Buffer buffer) {");
+        p("private "+bufferClassName+"(org.apache.activemq.util.buffer.Buffer buffer) {");
         indent();
         p("this.buffer = buffer;");
         unindent();
@@ -653,7 +653,7 @@
         unindent();
         p("}");
         p();
-        p("public static "+bufferClassName+" parseUnframed(org.apache.activemq.protobuf.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {");
+        p("public static "+bufferClassName+" parseUnframed(org.apache.activemq.util.buffer.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {");
         indent();
         p("return new "+bufferClassName+"(data);");
         unindent();
@@ -661,7 +661,7 @@
         p();
         p("public static "+bufferClassName+" parseUnframed(byte[] data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {");
         indent();
-        p("return parseUnframed(new org.apache.activemq.protobuf.Buffer(data));");
+        p("return parseUnframed(new org.apache.activemq.util.buffer.Buffer(data));");
         unindent();
         p("}");
         p();
@@ -675,7 +675,7 @@
         unindent();
         p("}");
         p();
-        p("public static "+bufferClassName+" parseFramed(org.apache.activemq.protobuf.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {");
+        p("public static "+bufferClassName+" parseFramed(org.apache.activemq.util.buffer.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {");
         indent();
         p("try {");
         indent();
@@ -698,7 +698,7 @@
         p();
         p("public static "+bufferClassName+" parseFramed(byte[] data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {");
         indent();
-        p("return parseFramed(new org.apache.activemq.protobuf.Buffer(data));");
+        p("return parseFramed(new org.apache.activemq.util.buffer.Buffer(data));");
         unindent();
         p("}");
         p();
@@ -929,7 +929,7 @@
      */
     private void generateMethodWrite(MessageDescriptor m) {
         
-        p("public org.apache.activemq.protobuf.Buffer toUnframedBuffer() {");
+        p("public org.apache.activemq.util.buffer.Buffer toUnframedBuffer() {");
         indent();
         p("if( buffer !=null ) {");
         indent();
@@ -940,7 +940,7 @@
         unindent();
         p("}");
         p();
-        p("public org.apache.activemq.protobuf.Buffer toFramedBuffer() {");
+        p("public org.apache.activemq.util.buffer.Buffer toFramedBuffer() {");
         indent();
         p("return org.apache.activemq.protobuf.MessageBufferSupport.toFramedBuffer(this);");
         unindent();
@@ -993,7 +993,7 @@
         p("org.apache.activemq.protobuf.CodedOutputStream original=null;");
         p("if( buffer == null ) {");
         indent();
-        p("buffer = new org.apache.activemq.protobuf.Buffer(new byte[size]);");
+        p("buffer = new org.apache.activemq.util.buffer.Buffer(new byte[size]);");
         p("original = output;");
         p("output = new org.apache.activemq.protobuf.CodedOutputStream(buffer);");
         unindent();
@@ -1133,9 +1133,9 @@
 						indent();
 			            String override = getOption(field.getOptions(), "java_override_type", null);
 			            if( "AsciiBuffer".equals(override) ) {
-                            p(setter + "(new org.apache.activemq.protobuf.AsciiBuffer(input.readBytes()));");
+                            p(setter + "(new org.apache.activemq.util.buffer.AsciiBuffer(input.readBytes()));");
 			            } else if( "UTF8Buffer".equals(override) ) {
-                            p(setter + "(new org.apache.activemq.protobuf.UTF8Buffer(input.readBytes()));");
+                            p(setter + "(new org.apache.activemq.util.buffer.UTF8Buffer(input.readBytes()));");
 			            } else {
 	                        p(setter + "(input.readBytes());");
 			            }						
@@ -2117,8 +2117,8 @@
             p("}");
             p();
             
-            generateParseDelegate(ed, "parseUnframed", "org.apache.activemq.protobuf.Buffer", "org.apache.activemq.protobuf.InvalidProtocolBufferException");
-            generateParseDelegate(ed, "parseFramed", "org.apache.activemq.protobuf.Buffer", "org.apache.activemq.protobuf.InvalidProtocolBufferException");
+            generateParseDelegate(ed, "parseUnframed", "org.apache.activemq.util.buffer.Buffer", "org.apache.activemq.protobuf.InvalidProtocolBufferException");
+            generateParseDelegate(ed, "parseFramed", "org.apache.activemq.util.buffer.Buffer", "org.apache.activemq.protobuf.InvalidProtocolBufferException");
             generateParseDelegate(ed, "parseUnframed", "byte[]", "org.apache.activemq.protobuf.InvalidProtocolBufferException");
             generateParseDelegate(ed, "parseFramed", "byte[]", "org.apache.activemq.protobuf.InvalidProtocolBufferException");
             generateParseDelegate(ed, "parseFramed", "org.apache.activemq.protobuf.CodedInputStream", "org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException");
@@ -2168,11 +2168,11 @@
             // TODO: support handling string fields as buffers.
 //            String override = getOption(field.getOptions(), "java_override_type", null);
 //            if( "AsciiBuffer".equals(override) ) {
-//                return "org.apache.activemq.protobuf.AsciiBuffer";
+//                return "org.apache.activemq.util.buffer.AsciiBuffer";
 //            } else if( "UTF8Buffer".equals(override) ) {
-//                return "org.apache.activemq.protobuf.UTF8Buffer";
+//                return "org.apache.activemq.util.buffer.UTF8Buffer";
 //            } else if( "Buffer".equals(override) ) {
-//                return "org.apache.activemq.protobuf.Buffer";
+//                return "org.apache.activemq.util.buffer.Buffer";
 //            } else {
                 return "java.lang.String";
 //            }
@@ -2180,11 +2180,11 @@
         if( field.getType() == FieldDescriptor.BYTES_TYPE ) {
             String override = getOption(field.getOptions(), "java_override_type", null);
             if( "AsciiBuffer".equals(override) ) {
-                return "org.apache.activemq.protobuf.AsciiBuffer";
+                return "org.apache.activemq.util.buffer.AsciiBuffer";
             } else if( "UTF8Buffer".equals(override) ) {
-                return "org.apache.activemq.protobuf.UTF8Buffer";
+                return "org.apache.activemq.util.buffer.UTF8Buffer";
             } else {
-                return "org.apache.activemq.protobuf.Buffer";
+                return "org.apache.activemq.util.buffer.Buffer";
             }
         }
         if( field.getType() == FieldDescriptor.BOOL_TYPE ) {
@@ -2212,11 +2212,11 @@
             // TODO: support handling string fields as buffers.
 //            String override = getOption(field.getOptions(), "java_override_type", null);
 //            if( "AsciiBuffer".equals(override) ) {
-//                return "org.apache.activemq.protobuf.AsciiBuffer";
+//                return "org.apache.activemq.util.buffer.AsciiBuffer";
 //            } else if( "UTF8Buffer".equals(override) ) {
-//                return "org.apache.activemq.protobuf.UTF8Buffer";
+//                return "org.apache.activemq.util.buffer.UTF8Buffer";
 //            } else if( "Buffer".equals(override) ) {
-//                return "org.apache.activemq.protobuf.Buffer";
+//                return "org.apache.activemq.util.buffer.Buffer";
 //            } else {
                 return "java.lang.String";
 //            }
@@ -2224,11 +2224,11 @@
         if( field.getType() == FieldDescriptor.BYTES_TYPE ) {
             String override = getOption(field.getOptions(), "java_override_type", null);
             if( "AsciiBuffer".equals(override) ) {
-                return "org.apache.activemq.protobuf.AsciiBuffer";
+                return "org.apache.activemq.util.buffer.AsciiBuffer";
             } else if( "UTF8Buffer".equals(override) ) {
-                return "org.apache.activemq.protobuf.UTF8Buffer";
+                return "org.apache.activemq.util.buffer.UTF8Buffer";
             } else {
-                return "org.apache.activemq.protobuf.Buffer";
+                return "org.apache.activemq.util.buffer.Buffer";
             }
         }
         if( field.getType() == FieldDescriptor.BOOL_TYPE ) {

Modified: activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/compiler/JavaGenerator.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/compiler/JavaGenerator.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/compiler/JavaGenerator.java (original)
+++ activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/compiler/JavaGenerator.java Mon Jun 29 16:28:18 2009
@@ -34,9 +34,9 @@
 import java.util.Map;
 import java.util.StringTokenizer;
 
-import org.apache.activemq.protobuf.Buffer;
 import org.apache.activemq.protobuf.compiler.parser.ParseException;
 import org.apache.activemq.protobuf.compiler.parser.ProtoParser;
+import org.apache.activemq.util.buffer.Buffer;
 
 public class JavaGenerator {
 
@@ -441,7 +441,7 @@
         p("}");
         p();
 
-        p("public static "+className+" parseUnframed(org.apache.activemq.protobuf.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {");
+        p("public static "+className+" parseUnframed(org.apache.activemq.util.buffer.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {");
         indent();
         p("return new "+className+"().mergeUnframed(data)"+postMergeProcessing+";");
         unindent();
@@ -469,7 +469,7 @@
         p("}");
         p();
         
-        p("public static "+className+" parseFramed(org.apache.activemq.protobuf.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {");
+        p("public static "+className+" parseFramed(org.apache.activemq.util.buffer.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {");
         indent();
         p("return new "+className+"().mergeFramed(data)"+postMergeProcessing+";");
         unindent();
@@ -686,7 +686,7 @@
             p("org.apache.activemq.protobuf.CodedOutputStream original=null;");
             p("if( encodedForm == null ) {");
             indent();
-            p("encodedForm = new org.apache.activemq.protobuf.Buffer(new byte[size]);");
+            p("encodedForm = new org.apache.activemq.util.buffer.Buffer(new byte[size]);");
             p("original = output;");
             p("output = new org.apache.activemq.protobuf.CodedOutputStream(encodedForm);");
             unindent();
@@ -1343,7 +1343,7 @@
             if( field.isStringType() ) {
                 return asJavaString(defaultOption.getValue());
             } else if( field.getType() == FieldDescriptor.BYTES_TYPE ) {
-                return "new org.apache.activemq.protobuf.Buffer("+asJavaString(defaultOption.getValue())+")";
+                return "new org.apache.activemq.util.buffer.Buffer("+asJavaString(defaultOption.getValue())+")";
             } else if( field.isInteger32Type() ) {
                 int v;
                 if( field.getType() == FieldDescriptor.UINT32_TYPE ) {
@@ -1523,7 +1523,7 @@
             return "java.lang.String";
         }
         if( field.getType() == FieldDescriptor.BYTES_TYPE ) {
-            return "org.apache.activemq.protobuf.Buffer";
+            return "org.apache.activemq.util.buffer.Buffer";
         }
         if( field.getType() == FieldDescriptor.BOOL_TYPE ) {
             return "java.lang.Boolean";
@@ -1550,7 +1550,7 @@
             return "java.lang.String";
         }
         if( field.getType() == FieldDescriptor.BYTES_TYPE ) {
-            return "org.apache.activemq.protobuf.Buffer";
+            return "org.apache.activemq.util.buffer.Buffer";
         }
         if( field.getType() == FieldDescriptor.BOOL_TYPE ) {
             return "boolean";

Modified: activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/compiler/TextFormat.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/compiler/TextFormat.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/compiler/TextFormat.java (original)
+++ activemq/sandbox/activemq-flow/activemq-protobuf/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/compiler/TextFormat.java Mon Jun 29 16:28:18 2009
@@ -22,8 +22,8 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import org.apache.activemq.protobuf.Buffer;
-import org.apache.activemq.protobuf.UTF8Buffer;
+import org.apache.activemq.util.buffer.Buffer;
+import org.apache.activemq.util.buffer.UTF8Buffer;
 
 /** 
  * Provide ascii text parsing and formatting support for proto2 instances.

Modified: activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/CursoredQueue.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/CursoredQueue.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/CursoredQueue.java (original)
+++ activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/CursoredQueue.java Mon Jun 29 16:28:18 2009
@@ -31,9 +31,9 @@
 import org.apache.activemq.queue.Subscription.SubscriptionDelivery;
 import org.apache.activemq.util.Comparators;
 import org.apache.activemq.util.Mapper;
-import org.apache.activemq.util.SortedLinkedList;
-import org.apache.activemq.util.SortedLinkedListNode;
 import org.apache.activemq.util.TreeMap;
+import org.apache.activemq.util.list.SortedLinkedList;
+import org.apache.activemq.util.list.SortedLinkedListNode;
 
 /**
  * @author cmacnaug

Modified: activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/ExclusivePersistentQueue.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/ExclusivePersistentQueue.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/ExclusivePersistentQueue.java (original)
+++ activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/ExclusivePersistentQueue.java Mon Jun 29 16:28:18 2009
@@ -23,11 +23,11 @@
 import org.apache.activemq.flow.ISinkController;
 import org.apache.activemq.flow.ISourceController;
 import org.apache.activemq.flow.SizeLimiter;
-import org.apache.activemq.protobuf.AsciiBuffer;
 import org.apache.activemq.queue.CursoredQueue.Cursor;
 import org.apache.activemq.queue.CursoredQueue.QueueElement;
 import org.apache.activemq.queue.Subscription.SubscriptionDelivery;
 import org.apache.activemq.util.Mapper;
+import org.apache.activemq.util.buffer.AsciiBuffer;
 
 public class ExclusivePersistentQueue<K, E> extends AbstractFlowQueue<E> implements IQueue<K, E> {
     private CursoredQueue<E> queue;

Modified: activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/ExclusivePriorityQueue.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/ExclusivePriorityQueue.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/ExclusivePriorityQueue.java (original)
+++ activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/ExclusivePriorityQueue.java Mon Jun 29 16:28:18 2009
@@ -22,7 +22,7 @@
 import org.apache.activemq.flow.PriorityFlowController;
 import org.apache.activemq.flow.PrioritySizeLimiter;
 import org.apache.activemq.util.PriorityLinkedList;
-import org.apache.kahadb.util.LinkedNode;
+import org.apache.activemq.util.list.LinkedNode;
 
 /**
  */

Modified: activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/MultiFlowQueue.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/MultiFlowQueue.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/MultiFlowQueue.java (original)
+++ activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/MultiFlowQueue.java Mon Jun 29 16:28:18 2009
@@ -26,8 +26,8 @@
 import org.apache.activemq.flow.ISinkController;
 import org.apache.activemq.flow.ISourceController;
 import org.apache.activemq.flow.SizeLimiter;
-import org.apache.kahadb.util.LinkedNode;
-import org.apache.kahadb.util.LinkedNodeList;
+import org.apache.activemq.util.list.LinkedNode;
+import org.apache.activemq.util.list.LinkedNodeList;
 
 public class MultiFlowQueue<E> extends AbstractFlowQueue<E> {
     private final HashMap<Flow, SingleFlowQueue> flowQueues = new HashMap<Flow, SingleFlowQueue>();

Modified: activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/PartitionedQueue.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/PartitionedQueue.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/PartitionedQueue.java (original)
+++ activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/PartitionedQueue.java Mon Jun 29 16:28:18 2009
@@ -22,8 +22,8 @@
 
 import org.apache.activemq.dispatch.IDispatcher;
 import org.apache.activemq.flow.ISourceController;
-import org.apache.activemq.protobuf.AsciiBuffer;
 import org.apache.activemq.util.Mapper;
+import org.apache.activemq.util.buffer.AsciiBuffer;
 
 abstract public class PartitionedQueue<K, V> extends AbstractFlowQueue<V> implements IPartitionedQueue<K, V> {
 

Modified: activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/QueueDescriptor.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/QueueDescriptor.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/QueueDescriptor.java (original)
+++ activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/QueueDescriptor.java Mon Jun 29 16:28:18 2009
@@ -16,7 +16,7 @@
  */
 package org.apache.activemq.queue;
 
-import org.apache.activemq.protobuf.AsciiBuffer;
+import org.apache.activemq.util.buffer.AsciiBuffer;
 
 public class QueueDescriptor {
 

Modified: activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/QueueStore.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/QueueStore.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/QueueStore.java (original)
+++ activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/QueueStore.java Mon Jun 29 16:28:18 2009
@@ -18,8 +18,8 @@
 
 
 import org.apache.activemq.flow.ISourceController;
-import org.apache.activemq.protobuf.AsciiBuffer;
-import org.apache.activemq.protobuf.Buffer;
+import org.apache.activemq.util.buffer.AsciiBuffer;
+import org.apache.activemq.util.buffer.Buffer;
 
 public interface QueueStore<K, V> {
 

Modified: activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/SharedPriorityQueue.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/SharedPriorityQueue.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/SharedPriorityQueue.java (original)
+++ activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/SharedPriorityQueue.java Mon Jun 29 16:28:18 2009
@@ -18,7 +18,7 @@
 
 import java.util.ArrayList;
 import org.apache.activemq.flow.PrioritySizeLimiter;
-import org.apache.activemq.protobuf.AsciiBuffer;
+import org.apache.activemq.util.buffer.AsciiBuffer;
 
 public class SharedPriorityQueue<K, V> extends PartitionedQueue<K, V> {
 

Modified: activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/SharedQueue.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/SharedQueue.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/SharedQueue.java (original)
+++ activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/SharedQueue.java Mon Jun 29 16:28:18 2009
@@ -26,14 +26,14 @@
 import org.apache.activemq.flow.ISinkController;
 import org.apache.activemq.flow.ISourceController;
 import org.apache.activemq.flow.SizeLimiter;
-import org.apache.activemq.protobuf.AsciiBuffer;
 import org.apache.activemq.queue.CursoredQueue.Cursor;
 import org.apache.activemq.queue.CursoredQueue.CursorReadyListener;
 import org.apache.activemq.queue.CursoredQueue.QueueElement;
 import org.apache.activemq.queue.Subscription.SubscriptionDelivery;
 import org.apache.activemq.util.Mapper;
-import org.apache.kahadb.util.LinkedNode;
-import org.apache.kahadb.util.LinkedNodeList;
+import org.apache.activemq.util.buffer.AsciiBuffer;
+import org.apache.activemq.util.list.LinkedNode;
+import org.apache.activemq.util.list.LinkedNodeList;
 
 /**
  * A SharedMessageQueue.

Modified: activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/SharedQueueOld.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/SharedQueueOld.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/SharedQueueOld.java (original)
+++ activemq/sandbox/activemq-flow/activemq-queue/src/main/java/org/apache/activemq/queue/SharedQueueOld.java Mon Jun 29 16:28:18 2009
@@ -30,10 +30,10 @@
 import org.apache.activemq.flow.IFlowSizeLimiter;
 import org.apache.activemq.flow.ISinkController;
 import org.apache.activemq.flow.ISourceController;
-import org.apache.activemq.protobuf.AsciiBuffer;
 import org.apache.activemq.util.Mapper;
-import org.apache.kahadb.util.LinkedNode;
-import org.apache.kahadb.util.LinkedNodeList;
+import org.apache.activemq.util.buffer.AsciiBuffer;
+import org.apache.activemq.util.list.LinkedNode;
+import org.apache.activemq.util.list.LinkedNodeList;
 
 /**
  * IQueue which does direct dispatch whenever it can.

Modified: activemq/sandbox/activemq-flow/activemq-queue/src/test/java/org/apache/activemq/queue/perf/Message.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-queue/src/test/java/org/apache/activemq/queue/perf/Message.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-queue/src/test/java/org/apache/activemq/queue/perf/Message.java (original)
+++ activemq/sandbox/activemq-flow/activemq-queue/src/test/java/org/apache/activemq/queue/perf/Message.java Mon Jun 29 16:28:18 2009
@@ -22,8 +22,8 @@
 import org.apache.activemq.flow.Commands.Destination;
 import org.apache.activemq.flow.Commands.Message.MessageBean;
 import org.apache.activemq.flow.Commands.Message.MessageBuffer;
-import org.apache.activemq.protobuf.UTF8Buffer;
 import org.apache.activemq.util.Mapper;
+import org.apache.activemq.util.buffer.UTF8Buffer;
 
 public class Message implements Serializable {
 

Modified: activemq/sandbox/activemq-flow/activemq-queue/src/test/java/org/apache/activemq/queue/perf/MockBrokerTest.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-queue/src/test/java/org/apache/activemq/queue/perf/MockBrokerTest.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-queue/src/test/java/org/apache/activemq/queue/perf/MockBrokerTest.java (original)
+++ activemq/sandbox/activemq-flow/activemq-queue/src/test/java/org/apache/activemq/queue/perf/MockBrokerTest.java Mon Jun 29 16:28:18 2009
@@ -25,8 +25,8 @@
 import org.apache.activemq.flow.Commands.Destination;
 import org.apache.activemq.flow.Commands.Destination.DestinationBean;
 import org.apache.activemq.flow.Commands.Destination.DestinationBuffer;
-import org.apache.activemq.protobuf.AsciiBuffer;
 import org.apache.activemq.util.Mapper;
+import org.apache.activemq.util.buffer.AsciiBuffer;
 
 public class MockBrokerTest extends TestCase {
 

Modified: activemq/sandbox/activemq-flow/activemq-queue/src/test/java/org/apache/activemq/queue/perf/MockClient.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-queue/src/test/java/org/apache/activemq/queue/perf/MockClient.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-queue/src/test/java/org/apache/activemq/queue/perf/MockClient.java (original)
+++ activemq/sandbox/activemq-flow/activemq-queue/src/test/java/org/apache/activemq/queue/perf/MockClient.java Mon Jun 29 16:28:18 2009
@@ -15,8 +15,8 @@
 import org.apache.activemq.metric.MetricAggregator;
 import org.apache.activemq.metric.MetricCounter;
 import org.apache.activemq.metric.Period;
-import org.apache.activemq.protobuf.AsciiBuffer;
 import org.apache.activemq.util.IntrospectionSupport;
+import org.apache.activemq.util.buffer.AsciiBuffer;
 
 public class MockClient {
 

Modified: activemq/sandbox/activemq-flow/activemq-queue/src/test/java/org/apache/activemq/queue/perf/Proto2WireFormatFactory.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-queue/src/test/java/org/apache/activemq/queue/perf/Proto2WireFormatFactory.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-queue/src/test/java/org/apache/activemq/queue/perf/Proto2WireFormatFactory.java (original)
+++ activemq/sandbox/activemq-flow/activemq-queue/src/test/java/org/apache/activemq/queue/perf/Proto2WireFormatFactory.java Mon Jun 29 16:28:18 2009
@@ -13,10 +13,10 @@
 import org.apache.activemq.flow.Commands.FlowControl.FlowControlBuffer;
 import org.apache.activemq.flow.Commands.Message.MessageBean;
 import org.apache.activemq.transport.Transport;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.DataByteArrayInputStream;
-import org.apache.activemq.util.DataByteArrayOutputStream;
 import org.apache.activemq.util.IOExceptionSupport;
+import org.apache.activemq.util.buffer.Buffer;
+import org.apache.activemq.util.buffer.DataByteArrayInputStream;
+import org.apache.activemq.util.buffer.DataByteArrayOutputStream;
 import org.apache.activemq.wireformat.StatefulWireFormat;
 import org.apache.activemq.wireformat.WireFormat;
 import org.apache.activemq.wireformat.WireFormatFactory;
@@ -265,13 +265,13 @@
             return false;
         }
 
-        public ByteSequence marshal(Object value) throws IOException {
+        public Buffer marshal(Object value) throws IOException {
             DataByteArrayOutputStream os = new DataByteArrayOutputStream();
             marshal(value, os);
             return os.toByteSequence();
         }
         
-        public Object unmarshal(ByteSequence data) throws IOException {
+        public Object unmarshal(Buffer data) throws IOException {
             DataByteArrayInputStream is = new DataByteArrayInputStream(data);
             return unmarshal(is);
         }
@@ -299,7 +299,7 @@
     /* (non-Javadoc)
      * @see org.apache.activemq.wireformat.WireFormatFactory#matchesWireformatHeader(org.apache.activemq.util.ByteSequence)
      */
-    public boolean matchesWireformatHeader(ByteSequence byteSequence) {
+    public boolean matchesWireformatHeader(Buffer byteSequence) {
         throw new UnsupportedOperationException();
     }
 

Modified: activemq/sandbox/activemq-flow/activemq-queue/src/test/java/org/apache/activemq/queue/perf/ProtoWireFormatFactory.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-queue/src/test/java/org/apache/activemq/queue/perf/ProtoWireFormatFactory.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-queue/src/test/java/org/apache/activemq/queue/perf/ProtoWireFormatFactory.java (original)
+++ activemq/sandbox/activemq-flow/activemq-queue/src/test/java/org/apache/activemq/queue/perf/ProtoWireFormatFactory.java Mon Jun 29 16:28:18 2009
@@ -10,12 +10,11 @@
 import org.apache.activemq.flow.Commands.Destination.DestinationBuffer;
 import org.apache.activemq.flow.Commands.FlowControl.FlowControlBuffer;
 import org.apache.activemq.flow.Commands.Message.MessageBuffer;
-import org.apache.activemq.protobuf.Buffer;
 import org.apache.activemq.transport.Transport;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.DataByteArrayInputStream;
-import org.apache.activemq.util.DataByteArrayOutputStream;
 import org.apache.activemq.util.IOExceptionSupport;
+import org.apache.activemq.util.buffer.Buffer;
+import org.apache.activemq.util.buffer.DataByteArrayInputStream;
+import org.apache.activemq.util.buffer.DataByteArrayOutputStream;
 import org.apache.activemq.wireformat.StatefulWireFormat;
 import org.apache.activemq.wireformat.WireFormat;
 import org.apache.activemq.wireformat.WireFormatFactory;
@@ -228,13 +227,13 @@
             return false;
         }
 
-        public ByteSequence marshal(Object value) throws IOException {
+        public Buffer marshal(Object value) throws IOException {
             DataByteArrayOutputStream os = new DataByteArrayOutputStream();
             marshal(value, os);
             return os.toByteSequence();
         }
         
-        public Object unmarshal(ByteSequence data) throws IOException {
+        public Object unmarshal(Buffer data) throws IOException {
             DataByteArrayInputStream is = new DataByteArrayInputStream(data);
             return unmarshal(is);
         }
@@ -269,7 +268,7 @@
     /* (non-Javadoc)
      * @see org.apache.activemq.wireformat.WireFormatFactory#matchesWireformatHeader(org.apache.activemq.util.ByteSequence)
      */
-    public boolean matchesWireformatHeader(ByteSequence byteSequence) {
+    public boolean matchesWireformatHeader(Buffer byteSequence) {
         throw new UnsupportedOperationException();
     }
 

Modified: activemq/sandbox/activemq-flow/activemq-queue/src/test/java/org/apache/activemq/queue/perf/Router.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-queue/src/test/java/org/apache/activemq/queue/perf/Router.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-queue/src/test/java/org/apache/activemq/queue/perf/Router.java (original)
+++ activemq/sandbox/activemq-flow/activemq-queue/src/test/java/org/apache/activemq/queue/perf/Router.java Mon Jun 29 16:28:18 2009
@@ -9,8 +9,8 @@
 
 import org.apache.activemq.flow.ISourceController;
 import org.apache.activemq.flow.Commands.Destination;
-import org.apache.activemq.protobuf.AsciiBuffer;
 import org.apache.activemq.queue.perf.MockBroker.DeliveryTarget;
+import org.apache.activemq.util.buffer.AsciiBuffer;
 
 public class Router {
     final HashMap<AsciiBuffer, Collection<DeliveryTarget>> lookupTable = new HashMap<AsciiBuffer, Collection<DeliveryTarget>>();

Modified: activemq/sandbox/activemq-flow/activemq-selector/src/main/java/org/apache/activemq/filter/XalanXPathEvaluator.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-selector/src/main/java/org/apache/activemq/filter/XalanXPathEvaluator.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-selector/src/main/java/org/apache/activemq/filter/XalanXPathEvaluator.java (original)
+++ activemq/sandbox/activemq-flow/activemq-selector/src/main/java/org/apache/activemq/filter/XalanXPathEvaluator.java Mon Jun 29 16:28:18 2009
@@ -22,8 +22,8 @@
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 
-import org.apache.activemq.protobuf.Buffer;
-import org.apache.activemq.protobuf.BufferInputStream;
+import org.apache.activemq.util.buffer.Buffer;
+import org.apache.activemq.util.buffer.BufferInputStream;
 import org.apache.xpath.CachedXPathAPI;
 import org.apache.xpath.objects.XObject;
 import org.w3c.dom.Document;

Modified: activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/broker/stomp/LegacyFrameTranslator.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/broker/stomp/LegacyFrameTranslator.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/broker/stomp/LegacyFrameTranslator.java (original)
+++ activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/broker/stomp/LegacyFrameTranslator.java Mon Jun 29 16:28:18 2009
@@ -30,10 +30,10 @@
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ActiveMQMessage;
 import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.protobuf.AsciiBuffer;
 import org.apache.activemq.transport.stomp.ProtocolException;
 import org.apache.activemq.transport.stomp.Stomp;
 import org.apache.activemq.transport.stomp.StompFrame;
+import org.apache.activemq.util.buffer.AsciiBuffer;
 
 /**
  * Implements ActiveMQ 4.0 translations

Modified: activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/broker/stomp/StompMessageDelivery.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/broker/stomp/StompMessageDelivery.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/broker/stomp/StompMessageDelivery.java (original)
+++ activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/broker/stomp/StompMessageDelivery.java Mon Jun 29 16:28:18 2009
@@ -20,10 +20,10 @@
 import org.apache.activemq.apollo.broker.Destination;
 import org.apache.activemq.broker.store.Store.MessageRecord;
 import org.apache.activemq.filter.MessageEvaluationContext;
-import org.apache.activemq.protobuf.AsciiBuffer;
-import org.apache.activemq.protobuf.Buffer;
 import org.apache.activemq.transport.stomp.Stomp;
 import org.apache.activemq.transport.stomp.StompFrame;
+import org.apache.activemq.util.buffer.AsciiBuffer;
+import org.apache.activemq.util.buffer.Buffer;
 
 public class StompMessageDelivery extends BrokerMessageDelivery {
 

Modified: activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/broker/stomp/StompProtocolHandler.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/broker/stomp/StompProtocolHandler.java?rev=789377&r1=789376&r2=789377&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/broker/stomp/StompProtocolHandler.java (original)
+++ activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/broker/stomp/StompProtocolHandler.java Mon Jun 29 16:28:18 2009
@@ -47,15 +47,15 @@
 import org.apache.activemq.flow.ISourceController;
 import org.apache.activemq.flow.SizeLimiter;
 import org.apache.activemq.flow.ISinkController.FlowControllable;
-import org.apache.activemq.protobuf.AsciiBuffer;
 import org.apache.activemq.queue.QueueDispatchTarget;
 import org.apache.activemq.queue.SingleFlowRelay;
 import org.apache.activemq.selector.SelectorParser;
 import org.apache.activemq.transport.stomp.Stomp;
 import org.apache.activemq.transport.stomp.StompFrame;
 import org.apache.activemq.transport.stomp.StompSubscription;
-import org.apache.activemq.util.ByteArrayOutputStream;
 import org.apache.activemq.util.FactoryFinder;
+import org.apache.activemq.util.buffer.AsciiBuffer;
+import org.apache.activemq.util.buffer.ByteArrayOutputStream;
 import org.apache.activemq.wireformat.WireFormat;
 
 public class StompProtocolHandler implements ProtocolHandler, StompMessageDelivery.PersistListener {



Mime
View raw message