activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r928883 [7/7] - in /activemq/activemq-cpp/trunk/activemq-cpp/src: main/ main/activemq/commands/ main/activemq/wireformat/openwire/ main/activemq/wireformat/openwire/marshal/ main/decaf/io/ test-benchmarks/decaf/io/ test/activemq/transport/ ...
Date Mon, 29 Mar 2010 19:39:46 GMT
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/IntegerResponseMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/IntegerResponseMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/IntegerResponseMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/IntegerResponseMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void IntegerResponseMarshallerTest::test
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void IntegerResponseMarshallerTest::test
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/JournalQueueAckMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/JournalQueueAckMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/JournalQueueAckMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/JournalQueueAckMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void JournalQueueAckMarshallerTest::test
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void JournalQueueAckMarshallerTest::test
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/JournalTopicAckMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/JournalTopicAckMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/JournalTopicAckMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/JournalTopicAckMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void JournalTopicAckMarshallerTest::test
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void JournalTopicAckMarshallerTest::test
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/JournalTraceMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/JournalTraceMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/JournalTraceMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/JournalTraceMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void JournalTraceMarshallerTest::testLoo
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void JournalTraceMarshallerTest::testTig
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/JournalTransactionMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/JournalTransactionMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/JournalTransactionMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/JournalTransactionMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void JournalTransactionMarshallerTest::t
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void JournalTransactionMarshallerTest::t
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/KeepAliveInfoMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/KeepAliveInfoMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/KeepAliveInfoMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/KeepAliveInfoMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void KeepAliveInfoMarshallerTest::testLo
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void KeepAliveInfoMarshallerTest::testTi
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/LastPartialCommandMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/LastPartialCommandMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/LastPartialCommandMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/LastPartialCommandMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void LastPartialCommandMarshallerTest::t
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void LastPartialCommandMarshallerTest::t
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/LocalTransactionIdMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/LocalTransactionIdMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/LocalTransactionIdMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/LocalTransactionIdMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void LocalTransactionIdMarshallerTest::t
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void LocalTransactionIdMarshallerTest::t
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageAckMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageAckMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageAckMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageAckMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void MessageAckMarshallerTest::testLoose
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void MessageAckMarshallerTest::testTight
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageDispatchMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageDispatchMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageDispatchMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageDispatchMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void MessageDispatchMarshallerTest::test
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void MessageDispatchMarshallerTest::test
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageDispatchNotificationMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageDispatchNotificationMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageDispatchNotificationMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageDispatchNotificationMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void MessageDispatchNotificationMarshall
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void MessageDispatchNotificationMarshall
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageIdMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageIdMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageIdMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageIdMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void MessageIdMarshallerTest::testLooseM
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void MessageIdMarshallerTest::testTightM
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessagePullMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessagePullMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessagePullMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessagePullMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void MessagePullMarshallerTest::testLoos
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void MessagePullMarshallerTest::testTigh
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/NetworkBridgeFilterMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/NetworkBridgeFilterMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/NetworkBridgeFilterMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/NetworkBridgeFilterMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void NetworkBridgeFilterMarshallerTest::
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void NetworkBridgeFilterMarshallerTest::
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/PartialCommandMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/PartialCommandMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/PartialCommandMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/PartialCommandMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void PartialCommandMarshallerTest::testL
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void PartialCommandMarshallerTest::testT
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerAckMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerAckMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerAckMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerAckMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void ProducerAckMarshallerTest::testLoos
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void ProducerAckMarshallerTest::testTigh
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerIdMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerIdMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerIdMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerIdMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void ProducerIdMarshallerTest::testLoose
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void ProducerIdMarshallerTest::testTight
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerInfoMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerInfoMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerInfoMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerInfoMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void ProducerInfoMarshallerTest::testLoo
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void ProducerInfoMarshallerTest::testTig
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/RemoveInfoMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/RemoveInfoMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/RemoveInfoMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/RemoveInfoMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void RemoveInfoMarshallerTest::testLoose
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void RemoveInfoMarshallerTest::testTight
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/RemoveSubscriptionInfoMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/RemoveSubscriptionInfoMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/RemoveSubscriptionInfoMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/RemoveSubscriptionInfoMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void RemoveSubscriptionInfoMarshallerTes
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void RemoveSubscriptionInfoMarshallerTes
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ReplayCommandMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ReplayCommandMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ReplayCommandMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ReplayCommandMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void ReplayCommandMarshallerTest::testLo
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void ReplayCommandMarshallerTest::testTi
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ResponseMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ResponseMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ResponseMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ResponseMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void ResponseMarshallerTest::testLooseMa
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void ResponseMarshallerTest::testTightMa
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/SessionIdMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/SessionIdMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/SessionIdMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/SessionIdMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void SessionIdMarshallerTest::testLooseM
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void SessionIdMarshallerTest::testTightM
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/SessionInfoMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/SessionInfoMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/SessionInfoMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/SessionInfoMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void SessionInfoMarshallerTest::testLoos
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void SessionInfoMarshallerTest::testTigh
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ShutdownInfoMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ShutdownInfoMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ShutdownInfoMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ShutdownInfoMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void ShutdownInfoMarshallerTest::testLoo
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void ShutdownInfoMarshallerTest::testTig
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/SubscriptionInfoMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/SubscriptionInfoMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/SubscriptionInfoMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/SubscriptionInfoMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void SubscriptionInfoMarshallerTest::tes
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void SubscriptionInfoMarshallerTest::tes
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/TransactionInfoMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/TransactionInfoMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/TransactionInfoMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/TransactionInfoMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void TransactionInfoMarshallerTest::test
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void TransactionInfoMarshallerTest::test
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/WireFormatInfoMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/WireFormatInfoMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/WireFormatInfoMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/WireFormatInfoMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void WireFormatInfoMarshallerTest::testL
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void WireFormatInfoMarshallerTest::testT
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/XATransactionIdMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/XATransactionIdMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/XATransactionIdMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/XATransactionIdMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void XATransactionIdMarshallerTest::test
         marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
         unsigned char dataType = dataIn.readByte();
         CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +135,8 @@ void XATransactionIdMarshallerTest::test
         marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
 
         // Now read it back in and make sure it's all right.
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         DataInputStream dataIn( &bais );
 
         unsigned char dataType = dataIn.readByte();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/utils/BooleanStreamTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/utils/BooleanStreamTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/utils/BooleanStreamTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/utils/BooleanStreamTest.cpp Mon Mar 29 19:39:39 2010
@@ -50,8 +50,8 @@ void BooleanStreamTest::test() {
     b1Stream.marshal( &daoStream );
 
     BooleanStream b2Stream;
-    decaf::io::ByteArrayInputStream baiStream( baoStream.toByteArray(),
-                                               (int)baoStream.size() );
+    std::pair<const unsigned char*, int> array = baoStream.toByteArray();
+    decaf::io::ByteArrayInputStream baiStream( array.first, array.second );
     decaf::io::DataInputStream daiStream( &baiStream );
 
     b2Stream.unmarshal( &daiStream );
@@ -65,6 +65,7 @@ void BooleanStreamTest::test() {
     CPPUNIT_ASSERT( b2Stream.readBoolean() == true );
     CPPUNIT_ASSERT( b2Stream.readBoolean() == true );
 
+    delete [] array.first;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -84,8 +85,8 @@ void BooleanStreamTest::test2(){
     b1Stream.marshal( &daoStream );
 
     BooleanStream b2Stream;
-    io::ByteArrayInputStream baiStream( baoStream.toByteArray(),
-                                        (int)baoStream.size() );
+    std::pair<const unsigned char*, int> array = baoStream.toByteArray();
+    decaf::io::ByteArrayInputStream baiStream( array.first, array.second );
     io::DataInputStream daiStream( &baiStream );
 
     b2Stream.unmarshal( &daiStream );
@@ -95,4 +96,6 @@ void BooleanStreamTest::test2(){
         CPPUNIT_ASSERT( b2Stream.readBoolean() == value );
         value = !value;
     }
+
+    delete [] array.first;
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/BufferedOutputStreamTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/BufferedOutputStreamTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/BufferedOutputStreamTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/BufferedOutputStreamTest.cpp Mon Mar 29 19:39:39 2010
@@ -119,16 +119,24 @@ void BufferedOutputStreamTest::testWrite
         BufferedOutputStream os( &baos, 512 );
         os.write( (unsigned char*)&testString[0], 500, 0, 500 );
 
-        CPPUNIT_ASSERT_MESSAGE( "Bytes written, not buffered", NULL == baos.toByteArray() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        CPPUNIT_ASSERT_MESSAGE( "Bytes written, not buffered", NULL == array.first );
+        delete [] array.first;
         os.flush();
-        ByteArrayInputStream bais2( baos.toByteArray(), (int)baos.size() );
+
+        array = baos.toByteArray();
+        ByteArrayInputStream bais2( array.first, array.second );
         CPPUNIT_ASSERT_MESSAGE( "Bytes not written after flush", 500 == bais2.available() );
         os.write( (unsigned char*)&testString[500], (int)testString.size(), 0, 514 );
-        ByteArrayInputStream bais3( baos.toByteArray(), (int)baos.size() );
+        delete [] array.first;
+
+        array = baos.toByteArray();
+        ByteArrayInputStream bais3( array.first, array.second );
         CPPUNIT_ASSERT_MESSAGE( "Bytes not written when buffer full",
                                 bais3.available() >= 1000);
         unsigned char wbytes[1014] = {0};
         bais3.read( wbytes, 1014, 0, 1013 );
+        delete [] array.first;
 
         CPPUNIT_ASSERT_MESSAGE(
             "Incorrect bytes written",
@@ -242,14 +250,16 @@ void BufferedOutputStreamTest::testWrite
         ByteArrayOutputStream baos;
         BufferedOutputStream os( &baos );
         os.write('t');
-        CPPUNIT_ASSERT_MESSAGE( "Byte written, not buffered", NULL == baos.toByteArray() );
+        CPPUNIT_ASSERT_MESSAGE( "Byte written, not buffered", NULL == baos.toByteArray().first );
         os.flush();
 
-        ByteArrayInputStream bais2( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais2( array.first, array.second );
         CPPUNIT_ASSERT_MESSAGE( "Byte not written after flush", 1 == bais2.available() );
         unsigned char wbytes[10];
         bais2.read( wbytes, 10, 0, 1 );
         CPPUNIT_ASSERT_MESSAGE( "Incorrect byte written", 't' == wbytes[0] );
+        delete [] array.first;
 
     } catch( IOException& e) {
         CPPUNIT_FAIL("Write test failed");

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/ByteArrayOutputStreamTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/ByteArrayOutputStreamTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/ByteArrayOutputStreamTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/ByteArrayOutputStreamTest.cpp Mon Mar 29 19:39:39 2010
@@ -32,8 +32,7 @@ using namespace decaf::util;
 
 ////////////////////////////////////////////////////////////////////////////////
 void ByteArrayOutputStreamTest::testConstructor1() {
-    std::vector<unsigned char> buffer;
-    ByteArrayOutputStream baos( buffer );
+    ByteArrayOutputStream baos( 500 );
     CPPUNIT_ASSERT_MESSAGE("Failed to create stream", 0 == baos.size() );
 }
 
@@ -70,13 +69,13 @@ void ByteArrayOutputStreamTest::testSize
 
 ////////////////////////////////////////////////////////////////////////////////
 void ByteArrayOutputStreamTest::testToByteArray() {
-    const unsigned char* bytes = NULL;
     ByteArrayOutputStream baos;
     baos.write( (unsigned char*)&testString[0], (int)testString.size(), 0, (int)testString.length() );
-    bytes = baos.toByteArray();
+    std::pair<const unsigned char*, int> array = baos.toByteArray();
     for( std::size_t i = 0; i < testString.length(); i++) {
-        CPPUNIT_ASSERT_MESSAGE("Error in byte array", bytes[i] == testString.at(i) );
+        CPPUNIT_ASSERT_MESSAGE("Error in byte array", array.first[i] == testString.at(i) );
     }
+    delete [] array.first;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -93,27 +92,30 @@ void ByteArrayOutputStreamTest::testWrit
 
     ByteArrayOutputStream baos;
     baos.write('t');
-    const unsigned char* bytes = baos.toByteArray();
+    std::pair<const unsigned char*, int> array = baos.toByteArray();
     CPPUNIT_ASSERT_MESSAGE( "Wrote incorrect bytes",
-                            string("t") == string( (const char*)bytes, baos.size() ) );
+                            string("t") == string( (const char*)array.first, array.second ) );
+    delete [] array.first;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 void ByteArrayOutputStreamTest::testWrite2() {
     ByteArrayOutputStream baos;
     baos.write( (unsigned char*)&testString[0], (int)testString.size(), 0, 100 );
-    const unsigned char* bytes = baos.toByteArray();
+    std::pair<const unsigned char*, int> array = baos.toByteArray();
     CPPUNIT_ASSERT_MESSAGE("Wrote incorrect bytes",
-            string((const char*)bytes, baos.size() ) == testString.substr(0, 100) );
+            string((const char*)array.first, array.second ) == testString.substr(0, 100) );
+    delete [] array.first;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 void ByteArrayOutputStreamTest::testWrite3() {
     ByteArrayOutputStream baos;
     baos.write( (unsigned char*)&testString[0], (int)testString.size(), 50, 100 );
-    const unsigned char* bytes = baos.toByteArray();
+    std::pair<const unsigned char*, int> array = baos.toByteArray();
     CPPUNIT_ASSERT_MESSAGE("Wrote incorrect bytes",
-            string((const char*)bytes, baos.size() ) == testString.substr(50, 100) );
+            string((const char*)array.first, array.second ) == testString.substr(50, 100) );
+    delete [] array.first;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -154,7 +156,9 @@ void ByteArrayOutputStreamTest::testStre
     unsigned char buffer[4];
 
     memset(buffer, 0, 4);
-    memcpy(buffer, stream_a.toByteArray(), stream_a.size());
+    std::pair<const unsigned char*, int> array = stream_a.toByteArray();
+    memcpy(buffer, array.first, array.second );
+    delete [] array.first;
 
     CPPUNIT_ASSERT( std::string((const char*)buffer) == std::string("abc") );
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/DataInputStreamTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/DataInputStreamTest.h?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/DataInputStreamTest.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/DataInputStreamTest.h Mon Mar 29 19:39:39 2010
@@ -116,7 +116,8 @@ namespace io{
                          unsigned char* expect, int expectLength );
 
         void openDataInputStream() {
-            this->bais.reset( new ByteArrayInputStream( baos->toByteArray(), (int)baos->size() ) );
+            std::pair<const unsigned char*, int> array = baos->toByteArray();
+            this->bais.reset( new ByteArrayInputStream( array.first, array.second, true ) );
             this->is.reset( new DataInputStream( bais.get() ) );
         }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/DataOutputStreamTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/DataOutputStreamTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/DataOutputStreamTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/DataOutputStreamTest.cpp Mon Mar 29 19:39:39 2010
@@ -287,13 +287,14 @@ void DataOutputStreamTest::testWriteUTFS
         UTFDataFormatException );
 
     // Test that a zero length string write the zero size marker.
-    ByteArrayInputStream byteIn;
     ByteArrayOutputStream byteOut;
-    DataInputStream dataIn( &byteIn );
     DataOutputStream dataOut( &byteOut );
     dataOut.writeUTF( "" );
     CPPUNIT_ASSERT( dataOut.size() == 2 );
-    byteIn.setByteArray( byteOut.toByteArray(), (int)byteOut.size() );
+
+    std::pair<const unsigned char*, int> array = byteOut.toByteArray();
+    ByteArrayInputStream byteIn( array.first, array.second, true );
+    DataInputStream dataIn( &byteIn );
     CPPUNIT_ASSERT( dataIn.readUnsignedShort() == 0 );
 }
 
@@ -304,16 +305,18 @@ void DataOutputStreamTest::testHelper( u
     std::string testStr( (char*)input, inputLength );
     os->writeUTF( testStr );
 
-    const unsigned char* result = baos->toByteArray();
+    std::pair<const unsigned char*, int> array = baos->toByteArray();
 
-    CPPUNIT_ASSERT( result[0] == 0x00 );
-    CPPUNIT_ASSERT( result[1] == (unsigned char)( expectLength ) );
+    CPPUNIT_ASSERT( array.first[0] == 0x00 );
+    CPPUNIT_ASSERT( array.first[1] == (unsigned char)( expectLength ) );
 
-    for( int i = 2; i < baos->size(); ++i ) {
-        CPPUNIT_ASSERT( result[i] == expect[i-2] );
+    for( int i = 2; i < array.second; ++i ) {
+        CPPUNIT_ASSERT( array.first[i] == expect[i-2] );
     }
 
     baos->reset();
+
+    delete [] array.first;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -371,40 +374,42 @@ void DataOutputStreamTest::test(){
     writer.writeDouble( doubleVal );
     writer.write( arrayVal, 3, 0, 3 );
 
-    const unsigned char* buffer = myStream.toByteArray();
+    std::pair<const unsigned char*, int> buffer = myStream.toByteArray();
     int ix = 0;
 
-    unsigned char tempByte = buffer[ix];
+    unsigned char tempByte = buffer.first[ix];
     CPPUNIT_ASSERT( tempByte == byteVal );
     ix += (int)sizeof( tempByte );
 
     unsigned short tempShort = 0;
-    memcpy( &tempShort, buffer+ix, sizeof( unsigned short ) );
+    memcpy( &tempShort, buffer.first+ix, sizeof( unsigned short ) );
     tempShort = util::Endian::byteSwap( tempShort );
     CPPUNIT_ASSERT( tempShort == shortVal );
     ix += (int)sizeof( tempShort );
 
     unsigned int tempInt = 0;
-    memcpy( &tempInt, buffer+ix, sizeof( unsigned int ) );
+    memcpy( &tempInt, buffer.first+ix, sizeof( unsigned int ) );
     tempInt = util::Endian::byteSwap( tempInt );
     CPPUNIT_ASSERT( tempInt == intVal );
     ix += (int)sizeof( tempInt );
 
     unsigned long long tempLong = 0;
-    memcpy( &tempLong, buffer+ix, sizeof( unsigned long long ) );
+    memcpy( &tempLong, buffer.first+ix, sizeof( unsigned long long ) );
     tempLong = util::Endian::byteSwap( tempLong );
     CPPUNIT_ASSERT( tempLong == longVal );
     ix += (int)sizeof( tempLong );
 
     float tempFloat = 0;
-    memcpy( &tempFloat, buffer+ix, sizeof( float ) );
+    memcpy( &tempFloat, buffer.first+ix, sizeof( float ) );
     tempFloat = util::Endian::byteSwap( tempFloat );
     CPPUNIT_ASSERT( tempFloat == floatVal );
     ix += (int)sizeof( tempFloat );
 
     double tempDouble = 0;
-    memcpy( &tempDouble, buffer+ix, sizeof( double ) );
+    memcpy( &tempDouble, buffer.first+ix, sizeof( double ) );
     tempDouble = util::Endian::byteSwap( tempDouble );
     CPPUNIT_ASSERT( tempDouble == doubleVal );
     ix += (int)sizeof( tempDouble );
+
+    delete [] buffer.first;
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/DataOutputStreamTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/DataOutputStreamTest.h?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/DataOutputStreamTest.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/DataOutputStreamTest.h Mon Mar 29 19:39:39 2010
@@ -104,7 +104,8 @@ namespace io{
                          unsigned char* expect, int expectLength );
 
         void openDataInputStream() {
-            this->bais.reset( new ByteArrayInputStream( baos->toByteArray(), (int)baos->size() ) );
+            std::pair<const unsigned char*, int> array = baos->toByteArray();
+            this->bais.reset( new ByteArrayInputStream( array.first, array.second, true ) );
             this->is.reset( new DataInputStream( bais.get() ) );
         }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/FilterOutputStreamTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/FilterOutputStreamTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/FilterOutputStreamTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/FilterOutputStreamTest.cpp Mon Mar 29 19:39:39 2010
@@ -77,7 +77,9 @@ void FilterOutputStreamTest::testWrite1(
         ByteArrayOutputStream baos;
         FilterOutputStream os( &baos );
         os.write( (unsigned char*)&testString[0], (int)testString.size(), 0, (int)testString.size() );
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         os.flush();
         CPPUNIT_ASSERT_MESSAGE( "Bytes not written after flush",
                                 bais.available() == (int)testString.length() );
@@ -99,7 +101,8 @@ void FilterOutputStreamTest::testWrite2(
         ByteArrayOutputStream baos;
         FilterOutputStream os( &baos );
         os.write('t');
-        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
+        std::pair<const unsigned char*, int> array = baos.toByteArray();
+        ByteArrayInputStream bais( array.first, array.second, true );
         os.flush();
         CPPUNIT_ASSERT_MESSAGE( "Byte not written after flush", 1 == bais.available() );
         unsigned char wbytes[1];

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/OutputStreamWriterTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/OutputStreamWriterTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/OutputStreamWriterTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/OutputStreamWriterTest.cpp Mon Mar 29 19:39:39 2010
@@ -197,6 +197,7 @@ void OutputStreamWriterTest::testWriteSt
 
 ////////////////////////////////////////////////////////////////////////////////
 void OutputStreamWriterTest::openInputStream() {
+    std::pair<const unsigned char*, int> array = this->buffer1->toByteArray();
     this->reader = new InputStreamReader(
-        new ByteArrayInputStream( this->buffer1->toByteArrayRef() ), true );
+        new ByteArrayInputStream( array.first, array.second, true ), true );
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/PropertiesTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/PropertiesTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/PropertiesTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/PropertiesTest.cpp Mon Mar 29 19:39:39 2010
@@ -335,7 +335,8 @@ void PropertiesTest::testStoreOutputStre
         myProps.store( &out, "A Header" );
         out.close();
 
-        ByteArrayInputStream in( out.toByteArray(), (int)out.size() );
+        std::pair<const unsigned char*, int> array = out.toByteArray();
+        ByteArrayInputStream in( array.first, array.second, true );
         myProps2.load( &in );
         in.close();
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/DeflaterOutputStreamTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/DeflaterOutputStreamTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/DeflaterOutputStreamTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/DeflaterOutputStreamTest.cpp Mon Mar 29 19:39:39 2010
@@ -208,7 +208,8 @@ void DeflaterOutputStreamTest::testClose
     dos.write( byteArray, 4 );
     dos.close();
 
-    ByteArrayInputStream bais( baos.toByteArrayRef() );
+    std::pair<const unsigned char*, int> array = baos.toByteArray();
+    ByteArrayInputStream bais( array.first, array.second, true );
     InflaterInputStream iis( &bais );
 
     // Test to see if the finish method wrote the bytes to the file.
@@ -255,7 +256,8 @@ void DeflaterOutputStreamTest::testWrite
     }
     dos.close();
 
-    ByteArrayInputStream bais( baos.toByteArrayRef() );
+    std::pair<const unsigned char*, int> array = baos.toByteArray();
+    ByteArrayInputStream bais( array.first, array.second, true );
     InflaterInputStream iis( &bais );
 
     for( int i = 0; i < 3; i++ ) {
@@ -277,7 +279,8 @@ void DeflaterOutputStreamTest::testWrite
     dos1.write( byteArray, 7, 2, 3 );
     dos1.close();
 
-    ByteArrayInputStream bais( baos.toByteArrayRef() );
+    std::pair<const unsigned char*, int> array = baos.toByteArray();
+    ByteArrayInputStream bais( array.first, array.second, true );
     InflaterInputStream iis( &bais );
     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Incorrect Byte Returned.", 4, iis.read() );
     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Incorrect Byte Returned.", 7, iis.read() );

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/InflaterInputStreamTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/InflaterInputStreamTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/InflaterInputStreamTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/InflaterInputStreamTest.cpp Mon Mar 29 19:39:39 2010
@@ -269,7 +269,8 @@ void InflaterInputStreamTest::testReadBI
     dos.write( test, 507 );
     dos.close();
 
-    ByteArrayInputStream bais( baos.toByteArrayRef() );
+    std::pair<const unsigned char*, int> array = baos.toByteArray();
+    ByteArrayInputStream bais( array.first, array.second, true );
     InflaterInputStream iis( &bais );
     unsigned char outBuf[530];
 



Mime
View raw message