You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2010/03/29 21:39:46 UTC
svn commit: r928883 [1/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/ ...
Author: tabish
Date: Mon Mar 29 19:39:39 2010
New Revision: 928883
URL: http://svn.apache.org/viewvc?rev=928883&view=rev
Log:
Rewrite the ByteArrayOutputStream test to improve performance and to make the API match the Java version more closely.
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMapMessage.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormat.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/BufferedInputStream.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/ByteArrayInputStream.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/ByteArrayInputStream.h
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/ByteArrayOutputStream.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/ByteArrayOutputStream.h
activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/DataOutputStreamBenchmark.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/IOTransportTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/MarshallingSupportTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/BaseDataStreamMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQBlobMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQBytesMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQMapMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQObjectMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQQueueMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQStreamMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQTempQueueMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQTempTopicMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQTextMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQTopicMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/BrokerIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/BrokerInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConnectionControlMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConnectionErrorMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConnectionIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConnectionInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConsumerControlMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConsumerIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConsumerInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ControlCommandMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/DataArrayResponseMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/DataResponseMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/DestinationInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/DiscoveryEventMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ExceptionResponseMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/FlushCommandMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/IntegerResponseMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/JournalQueueAckMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/JournalTopicAckMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/JournalTraceMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/JournalTransactionMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/KeepAliveInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/LastPartialCommandMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/LocalTransactionIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/MessageAckMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/MessageDispatchMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/MessageDispatchNotificationMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/MessageIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/MessagePullMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/NetworkBridgeFilterMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/PartialCommandMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ProducerAckMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ProducerIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ProducerInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/RemoveInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/RemoveSubscriptionInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ReplayCommandMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ResponseMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/SessionIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/SessionInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ShutdownInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/SubscriptionInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/TransactionInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/WireFormatInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/XATransactionIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/ActiveMQBlobMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/ActiveMQBytesMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/ActiveMQMapMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/ActiveMQMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/ActiveMQObjectMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/ActiveMQQueueMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/ActiveMQStreamMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/ActiveMQTempQueueMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/ActiveMQTempTopicMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/ActiveMQTextMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/ActiveMQTopicMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/BrokerIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/BrokerInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/ConnectionControlMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/ConnectionErrorMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/ConnectionIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/ConnectionInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/ConsumerControlMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/ConsumerIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/ConsumerInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/ControlCommandMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/DataArrayResponseMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/DataResponseMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/DestinationInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/DiscoveryEventMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/ExceptionResponseMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/FlushCommandMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/IntegerResponseMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/JournalQueueAckMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/JournalTopicAckMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/JournalTraceMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/JournalTransactionMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/KeepAliveInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/LastPartialCommandMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/LocalTransactionIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/MessageAckMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/MessageDispatchMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/MessageDispatchNotificationMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/MessageIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/MessagePullMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/NetworkBridgeFilterMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/PartialCommandMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/ProducerAckMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/ProducerIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/ProducerInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/RemoveInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/RemoveSubscriptionInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/ReplayCommandMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/ResponseMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/SessionIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/SessionInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/ShutdownInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/SubscriptionInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/TransactionInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/WireFormatInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v2/XATransactionIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/ActiveMQBlobMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/ActiveMQBytesMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/ActiveMQMapMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/ActiveMQMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/ActiveMQObjectMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/ActiveMQQueueMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/ActiveMQStreamMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/ActiveMQTempQueueMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/ActiveMQTempTopicMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/ActiveMQTextMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/ActiveMQTopicMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/BrokerIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/BrokerInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/ConnectionControlMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/ConnectionErrorMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/ConnectionIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/ConnectionInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/ConsumerControlMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/ConsumerIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/ConsumerInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/ControlCommandMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/DataArrayResponseMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/DataResponseMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/DestinationInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/DiscoveryEventMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/ExceptionResponseMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/FlushCommandMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/IntegerResponseMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/JournalQueueAckMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/JournalTopicAckMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/JournalTraceMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/JournalTransactionMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/KeepAliveInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/LastPartialCommandMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/LocalTransactionIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/MessageAckMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/MessageDispatchMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/MessageDispatchNotificationMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/MessageIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/MessagePullMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/NetworkBridgeFilterMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/PartialCommandMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/ProducerAckMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/ProducerIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/ProducerInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/RemoveInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/RemoveSubscriptionInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/ReplayCommandMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/ResponseMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/SessionIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/SessionInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/ShutdownInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/SubscriptionInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/TransactionInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/WireFormatInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v3/XATransactionIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ActiveMQBlobMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ActiveMQBytesMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ActiveMQMapMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ActiveMQMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ActiveMQObjectMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ActiveMQQueueMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ActiveMQStreamMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ActiveMQTempQueueMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ActiveMQTempTopicMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ActiveMQTextMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ActiveMQTopicMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/BrokerIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/BrokerInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionControlMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionErrorMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConnectionInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerControlMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ControlCommandMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/DataArrayResponseMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/DataResponseMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/DestinationInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/DiscoveryEventMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ExceptionResponseMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/FlushCommandMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/IntegerResponseMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/JournalQueueAckMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/JournalTopicAckMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/JournalTraceMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/JournalTransactionMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/KeepAliveInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/LastPartialCommandMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/LocalTransactionIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/MessageAckMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/MessageDispatchMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/MessageDispatchNotificationMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/MessageIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/MessagePullMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/NetworkBridgeFilterMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/PartialCommandMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ProducerAckMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ProducerIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ProducerInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/RemoveInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/RemoveSubscriptionInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ReplayCommandMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ResponseMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/SessionIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/SessionInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/ShutdownInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/SubscriptionInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/TransactionInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/WireFormatInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v4/XATransactionIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQBlobMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQBytesMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQMapMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQObjectMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQQueueMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQStreamMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTempQueueMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTempTopicMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTextMessageMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ActiveMQTopicMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/BrokerIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/BrokerInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ConnectionControlMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ConnectionErrorMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ConnectionIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ConnectionInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ConsumerControlMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ConsumerIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ConsumerInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ControlCommandMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/DataArrayResponseMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/DataResponseMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/DestinationInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/DiscoveryEventMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ExceptionResponseMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/FlushCommandMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/IntegerResponseMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/JournalQueueAckMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/JournalTopicAckMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/JournalTraceMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/JournalTransactionMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/KeepAliveInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/LastPartialCommandMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/LocalTransactionIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageAckMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageDispatchMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageDispatchNotificationMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessageIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/MessagePullMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/NetworkBridgeFilterMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/PartialCommandMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerAckMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ProducerInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/RemoveInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/RemoveSubscriptionInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ReplayCommandMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ResponseMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/SessionIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/SessionInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/ShutdownInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/SubscriptionInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/TransactionInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/WireFormatInfoMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v5/XATransactionIdMarshallerTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/utils/BooleanStreamTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/BufferedOutputStreamTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/ByteArrayOutputStreamTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/DataInputStreamTest.h
activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/DataOutputStreamTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/DataOutputStreamTest.h
activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/FilterOutputStreamTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/OutputStreamWriterTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/PropertiesTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/DeflaterOutputStreamTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/InflaterInputStreamTest.cpp
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am Mon Mar 29 19:39:39 2010
@@ -554,6 +554,7 @@ cc_sources = \
decaf/net/URL.cpp \
decaf/net/URLDecoder.cpp \
decaf/net/URLEncoder.cpp \
+ decaf/net/ssl/DefaultSSLSocketFactory.cpp \
decaf/net/ssl/SSLSocketFactory.cpp \
decaf/nio/Buffer.cpp \
decaf/nio/ByteBuffer.cpp \
@@ -1260,6 +1261,7 @@ h_sources = \
decaf/net/URLEncoder.h \
decaf/net/UnknownHostException.h \
decaf/net/UnknownServiceException.h \
+ decaf/net/ssl/DefaultSSLSocketFactory.h \
decaf/net/ssl/SSLSocketFactory.h \
decaf/nio/Buffer.h \
decaf/nio/BufferOverflowException.h \
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.cpp Mon Mar 29 19:39:39 2010
@@ -621,12 +621,16 @@ void ActiveMQBytesMessage::storeContent(
try {
- if( this->dataOut.get() != NULL ) {
+ if( this->dataOut.get() != NULL && this->bytesOut->size() > 0 ) {
this->dataOut->close();
if( !this->compressed ) {
- this->setContent( this->bytesOut->toByteArrayRef() );
+
+ std::pair<const unsigned char*, int> array = this->bytesOut->toByteArray();
+ this->setContent( std::vector<unsigned char>( array.first, array.first + array.second ) );
+ delete [] array.first;
+
} else {
ByteArrayOutputStream buffer;
@@ -639,7 +643,9 @@ void ActiveMQBytesMessage::storeContent(
this->bytesOut->writeTo( &doBuffer );
// Now store the annotated content.
- this->setContent( buffer.toByteArrayRef() );
+ std::pair<const unsigned char*, int> array = buffer.toByteArray();
+ this->setContent( std::vector<unsigned char>( array.first, array.first + array.second ) );
+ delete [] array.first;
}
this->dataOut.reset( NULL );
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMapMessage.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMapMessage.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMapMessage.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMapMessage.cpp Mon Mar 29 19:39:39 2010
@@ -116,7 +116,10 @@ void ActiveMQMapMessage::beforeMarshal(
DataOutputStream dataOut( os, true );
PrimitiveTypesMarshaller::marshalMap( map.get(), dataOut );
dataOut.close();
- setContent( bytesOut->toByteArrayRef() );
+
+ std::pair<const unsigned char*, int> array = bytesOut->toByteArray();
+ this->setContent( std::vector<unsigned char>( array.first, array.first + array.second ) );
+ delete [] array.first;
} else {
clearBody();
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp Mon Mar 29 19:39:39 2010
@@ -892,10 +892,16 @@ void ActiveMQStreamMessage::writeString(
////////////////////////////////////////////////////////////////////////////////
void ActiveMQStreamMessage::storeContent() {
- if( this->dataOut.get() != NULL ) {
+ if( this->dataOut.get() != NULL) {
this->dataOut->close();
- this->setContent( this->bytesOut->toByteArrayRef() );
+
+ if( this->bytesOut->size() > 0 ) {
+ std::pair<const unsigned char*, int> array = this->bytesOut->toByteArray();
+ this->setContent( std::vector<unsigned char>( array.first, array.first + array.second ) );
+ delete [] array.first;
+ }
+
this->dataOut.reset( NULL );
this->bytesOut = NULL;
}
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.cpp Mon Mar 29 19:39:39 2010
@@ -138,7 +138,12 @@ void ActiveMQTextMessage::beforeMarshal(
dataOut.close();
- this->setContent( bytesOut->toByteArrayRef() );
+ if( bytesOut->size() > 0 ) {
+ std::pair<const unsigned char*, int> array = bytesOut->toByteArray();
+ this->setContent( std::vector<unsigned char>( array.first, array.first + array.second ) );
+ delete [] array.first;
+ }
+
this->text.reset( NULL );
}
}
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormat.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormat.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormat.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormat.cpp Mon Mar 29 19:39:39 2010
@@ -229,7 +229,12 @@ void OpenWireFormat::marshal( const Poin
if( !sizePrefixDisabled ) {
looseOut->close();
dataOut->writeInt( (int)baos->size() );
- dataOut->write( baos->toByteArray(), (int)baos->size(), 0, (int)baos->size() );
+
+ if( baos->size() > 0 ) {
+ std::pair<const unsigned char*, int> array = baos->toByteArray();
+ dataOut->write( array.first, array.second );
+ delete [] array.first;
+ }
// Delete allocated resource
delete baos;
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp Mon Mar 29 19:39:39 2010
@@ -43,7 +43,7 @@ void PrimitiveTypesMarshaller::marshal(
try {
- ByteArrayOutputStream bytesOut( buffer );
+ ByteArrayOutputStream bytesOut;
DataOutputStream dataOut( &bytesOut );
if( map == NULL ) {
@@ -51,6 +51,12 @@ void PrimitiveTypesMarshaller::marshal(
} else {
PrimitiveTypesMarshaller::marshalPrimitiveMap( dataOut, *map );
}
+
+ if( bytesOut.size() > 0 ) {
+ std::pair<const unsigned char*, int> array = bytesOut.toByteArray();
+ buffer.insert( buffer.begin(), array.first, array.first + array.second );
+ delete [] array.first;
+ }
}
AMQ_CATCH_RETHROW( decaf::lang::Exception )
AMQ_CATCHALL_THROW( decaf::lang::Exception )
@@ -83,7 +89,7 @@ void PrimitiveTypesMarshaller::marshal(
try {
- ByteArrayOutputStream bytesOut( buffer );
+ ByteArrayOutputStream bytesOut;
DataOutputStream dataOut( &bytesOut );
if( list == NULL ) {
@@ -91,6 +97,12 @@ void PrimitiveTypesMarshaller::marshal(
} else {
PrimitiveTypesMarshaller::marshalPrimitiveList( dataOut, *list );
}
+
+ if( bytesOut.size() > 0 ) {
+ std::pair<const unsigned char*, int> array = bytesOut.toByteArray();
+ buffer.insert( buffer.begin(), array.first, array.first + array.second );
+ delete [] array.first;
+ }
}
AMQ_CATCH_RETHROW( decaf::lang::Exception )
AMQ_CATCHALL_THROW( decaf::lang::Exception )
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/BufferedInputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/BufferedInputStream.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/BufferedInputStream.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/BufferedInputStream.cpp Mon Mar 29 19:39:39 2010
@@ -53,7 +53,7 @@ BufferedInputStream::BufferedInputStream
BufferedInputStream::~BufferedInputStream() {
try{
this->close();
- delete this->deleteBuff;
+ delete [] this->deleteBuff;
}
DECAF_CATCH_NOTHROW( IOException )
DECAF_CATCHALL_NOTHROW()
@@ -62,12 +62,15 @@ BufferedInputStream::~BufferedInputStrea
////////////////////////////////////////////////////////////////////////////////
void BufferedInputStream::close() throw( IOException ) {
- // let parent close the inputStream
- FilterInputStream::close();
+ if( !this->isClosed() ) {
- // Free the class reference, read operation may still be
- // holding onto the buffer while blocked.
- std::swap( this->buff, this->deleteBuff );
+ // let parent close the inputStream
+ FilterInputStream::close();
+
+ // Free the class reference, read operation may still be
+ // holding onto the buffer while blocked.
+ std::swap( this->buff, this->deleteBuff );
+ }
}
////////////////////////////////////////////////////////////////////////////////
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/ByteArrayInputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/ByteArrayInputStream.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/ByteArrayInputStream.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/ByteArrayInputStream.cpp Mon Mar 29 19:39:39 2010
@@ -27,12 +27,12 @@ using namespace decaf::lang::exceptions;
////////////////////////////////////////////////////////////////////////////////
ByteArrayInputStream::ByteArrayInputStream() :
- InputStream(), buffer( NULL ), size( 0 ), count( 0 ), pos( 0 ), markpos( 0 ){
+ InputStream(), buffer( NULL ), size( 0 ), own( false ), count( 0 ), pos( 0 ), markpos( 0 ){
}
////////////////////////////////////////////////////////////////////////////////
ByteArrayInputStream::ByteArrayInputStream( const vector<unsigned char>& buffer ) :
- InputStream(), buffer( NULL ), size( 0 ), count( 0 ), pos( 0 ), markpos( 0 ) {
+ InputStream(), buffer( NULL ), size( 0 ), own( false ), count( 0 ), pos( 0 ), markpos( 0 ) {
if( buffer.size() > 0 ) {
setByteArray( &buffer[0], (int)buffer.size(), 0, (int)buffer.size() );
@@ -40,25 +40,31 @@ ByteArrayInputStream::ByteArrayInputStre
}
////////////////////////////////////////////////////////////////////////////////
-ByteArrayInputStream::ByteArrayInputStream( const unsigned char* buffer, int bufferSize )
+ByteArrayInputStream::ByteArrayInputStream( const unsigned char* buffer, int bufferSize, bool own )
throw( decaf::lang::exceptions::NullPointerException,
decaf::lang::exceptions::IllegalArgumentException ) :
- InputStream(), buffer( NULL ), size( 0 ), count( 0 ), pos( 0 ), markpos( 0 ){
+ InputStream(), buffer( NULL ), size( 0 ), own( own ), count( 0 ), pos( 0 ), markpos( 0 ) {
setByteArray( buffer, bufferSize, 0, bufferSize );
}
////////////////////////////////////////////////////////////////////////////////
-ByteArrayInputStream::ByteArrayInputStream( const unsigned char* buffer, int bufferSize, int offset, int length )
+ByteArrayInputStream::ByteArrayInputStream( const unsigned char* buffer, int bufferSize, int offset, int length, bool own )
throw( decaf::lang::exceptions::NullPointerException,
decaf::lang::exceptions::IllegalArgumentException ) :
- InputStream(), buffer( NULL ), size( 0 ), count( 0 ), pos( 0 ), markpos( 0 ){
+ InputStream(), buffer( NULL ), size( 0 ), own( own ), count( 0 ), pos( 0 ), markpos( 0 ) {
setByteArray( buffer, bufferSize, offset, length );
}
////////////////////////////////////////////////////////////////////////////////
ByteArrayInputStream::~ByteArrayInputStream(){
+ try{
+ if( this->own ) {
+ delete [] this->buffer;
+ }
+ }
+ DECAF_CATCHALL_NOTHROW()
}
////////////////////////////////////////////////////////////////////////////////
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/ByteArrayInputStream.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/ByteArrayInputStream.h?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/ByteArrayInputStream.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/ByteArrayInputStream.h Mon Mar 29 19:39:39 2010
@@ -31,7 +31,9 @@ namespace io{
* the stream. An internal counter keeps track of the next byte to be supplied by the read method.
* The ByteArrayInputStream never copies the supplied buffers, only points to them, therefore the
* caller must ensure that the supplied buffer remain in scope, or is not deleted before this
- * ByteArrayInputStream is freed.
+ * ByteArrayInputStream is freed. If the own argument of one of the constructors that accepts an
+ * array pointer is set to true than the ByteArrayInputStream instance will take ownership of the
+ * supplied pointer and delete it when that instance is destroyed.
*
* Closing a ByteArrayInputStream has no effect. The methods in this class can be called after
* the stream has been closed without generating an IOException.
@@ -54,6 +56,11 @@ namespace io{
int size;
/**
+ * Does this object own the supplied pointer.
+ */
+ bool own;
+
+ /**
* The index one greater than the last valid character in the input stream buffer. This
* value should always be nonnegative and not larger than the length of buffer. It is one
* greater than the position of the last byte within buffer that can ever be read from the
@@ -109,11 +116,13 @@ namespace io{
* The initial byte array to use to read from.
* @param bufferSize
* The size of the buffer.
+ * @param own
+ * Indicates if this object should take ownership of the array, default is false.
*
* @throws NullPointerException if the buffer is Null.
* @throws IllegalArguementException if the bufferSize is negative.
*/
- ByteArrayInputStream( const unsigned char* buffer, int bufferSize )
+ ByteArrayInputStream( const unsigned char* buffer, int bufferSize, bool own = false )
throw( decaf::lang::exceptions::NullPointerException,
decaf::lang::exceptions::IllegalArgumentException );
@@ -129,11 +138,13 @@ namespace io{
* The offset into the buffer to begin reading from.
* @param length
* The number of bytes to read past the offset.
+ * @param own
+ * Indicates if this object should take ownership of the array, default is false.
*
* @throws NullPointerException if the buffer is Null.
* @throws IllegalArguementException if the bufferSize is negative.
*/
- ByteArrayInputStream( const unsigned char* buffer, int bufferSize, int offset, int length )
+ ByteArrayInputStream( const unsigned char* buffer, int bufferSize, int offset, int length, bool own = false )
throw( decaf::lang::exceptions::NullPointerException,
decaf::lang::exceptions::IllegalArgumentException );
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/ByteArrayOutputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/ByteArrayOutputStream.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/ByteArrayOutputStream.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/ByteArrayOutputStream.cpp Mon Mar 29 19:39:39 2010
@@ -17,6 +17,10 @@
#include "ByteArrayOutputStream.h"
+#include <decaf/lang/System.h>
+
+#include <algorithm>
+
using namespace std;
using namespace decaf;
using namespace decaf::io;
@@ -24,51 +28,53 @@ using namespace decaf::lang;
using namespace decaf::lang::exceptions;
////////////////////////////////////////////////////////////////////////////////
-ByteArrayOutputStream::ByteArrayOutputStream() : OutputStream() {
- activeBuffer = &defaultBuffer;
+ByteArrayOutputStream::ByteArrayOutputStream() :
+ OutputStream(), buffer( new unsigned char[32] ), bufferSize( 32 ), count( 0 ) {
}
////////////////////////////////////////////////////////////////////////////////
-ByteArrayOutputStream::~ByteArrayOutputStream() {
-}
+ByteArrayOutputStream::ByteArrayOutputStream( int bufferSize )
+ throw( decaf::lang::exceptions::IllegalArgumentException ) :
+ OutputStream(), buffer( NULL ), bufferSize( bufferSize ), count( 0 ) {
-////////////////////////////////////////////////////////////////////////////////
-ByteArrayOutputStream::ByteArrayOutputStream( vector<unsigned char>& buffer) {
- setBuffer( buffer );
-}
+ if( bufferSize <= 0 ) {
+ throw IllegalArgumentException(
+ __FILE__, __LINE__, "Buffer size given was invalid: %d", bufferSize );
+ }
-////////////////////////////////////////////////////////////////////////////////
-void ByteArrayOutputStream::setBuffer( vector<unsigned char>& buffer) {
- activeBuffer = &buffer;
+ this->buffer = new unsigned char[bufferSize];
}
////////////////////////////////////////////////////////////////////////////////
-const unsigned char* ByteArrayOutputStream::toByteArray() const {
- if( activeBuffer == NULL || activeBuffer->size() == 0 ){
- return NULL;
+ByteArrayOutputStream::~ByteArrayOutputStream() {
+ try{
+ delete [] buffer;
}
-
- return &(*activeBuffer)[0];
+ DECAF_CATCH_NOTHROW( Exception )
+ DECAF_CATCHALL_NOTHROW()
}
////////////////////////////////////////////////////////////////////////////////
-const std::vector<unsigned char>& ByteArrayOutputStream::toByteArrayRef() const {
- if( activeBuffer == NULL ){
- return defaultBuffer;
+std::pair<const unsigned char*, int> ByteArrayOutputStream::toByteArray() const {
+
+ if( this->count == 0 ) {
+ return std::pair<const unsigned char*, int>( NULL, 0 );
}
- return *activeBuffer;
+ unsigned char* temp = new unsigned char[this->count];
+ System::arraycopy( this->buffer, 0, temp, 0, this->count );
+
+ return std::make_pair( temp, this->count );
}
////////////////////////////////////////////////////////////////////////////////
long long ByteArrayOutputStream::size() const {
- return activeBuffer->size();
+ return this->count;
}
////////////////////////////////////////////////////////////////////////////////
void ByteArrayOutputStream::reset() throw ( IOException ) {
- // Empty the contents of the buffer to the output stream.
- activeBuffer->clear();
+ this->count = 0;
}
////////////////////////////////////////////////////////////////////////////////
@@ -76,7 +82,12 @@ void ByteArrayOutputStream::doWriteByte(
throw ( IOException ) {
try{
- activeBuffer->push_back( c );
+
+ if( this->count == this->bufferSize ) {
+ checkExpandSize( 1 );
+ }
+
+ this->buffer[this->count++] = c;
}
DECAF_CATCH_RETHROW( IOException )
DECAF_CATCHALL_THROW( IOException )
@@ -113,7 +124,11 @@ void ByteArrayOutputStream::doWriteArray
}
try{
- activeBuffer->insert( activeBuffer->end(), buffer + offset, buffer + offset + length );
+
+ checkExpandSize( length );
+
+ System::arraycopy( buffer, offset, this->buffer, this->count, length );
+ this->count += length;
}
DECAF_CATCH_RETHROW( IOException )
DECAF_CATCH_RETHROW( IndexOutOfBoundsException )
@@ -124,11 +139,11 @@ void ByteArrayOutputStream::doWriteArray
////////////////////////////////////////////////////////////////////////////////
std::string ByteArrayOutputStream::toString() const {
- if( this->activeBuffer->empty() ) {
+ if( this->count == 0 ) {
return "";
}
- return string( (const char*)this->toByteArray(), (std::size_t)this->size() );
+ return string( (const char*)this->buffer, this->count );
}
////////////////////////////////////////////////////////////////////////////////
@@ -137,7 +152,7 @@ void ByteArrayOutputStream::writeTo( Out
try{
- if( this->size() == 0 ) {
+ if( this->count == 0 ) {
return;
}
@@ -146,9 +161,33 @@ void ByteArrayOutputStream::writeTo( Out
__FILE__, __LINE__, "Passed stream pointer is null" );
}
- out->write( this->toByteArray(), (int)this->size() );
+ out->write( this->buffer, this->count );
}
DECAF_CATCH_RETHROW( IOException )
DECAF_CATCH_RETHROW( NullPointerException )
DECAF_CATCHALL_THROW( IOException )
}
+
+////////////////////////////////////////////////////////////////////////////////
+void ByteArrayOutputStream::checkExpandSize( int needed ) {
+
+ try{
+
+ if( this->count + needed <= this->bufferSize ) {
+ return;
+ }
+
+ int newSize = ( this->count + needed ) * 2;
+ unsigned char* temp = new unsigned char[newSize];
+ System::arraycopy( this->buffer, 0, temp, 0, this->count );
+
+ std::swap( temp, this->buffer );
+
+ this->bufferSize = newSize;
+
+ delete [] temp;
+ }
+ DECAF_CATCH_RETHROW( IOException )
+ DECAF_CATCH_EXCEPTION_CONVERT( Exception, IOException )
+ DECAF_CATCHALL_THROW( IOException )
+}
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/ByteArrayOutputStream.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/ByteArrayOutputStream.h?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/ByteArrayOutputStream.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/ByteArrayOutputStream.h Mon Mar 29 19:39:39 2010
@@ -18,8 +18,12 @@
#ifndef _DECAF_IO_BYTEARRAYOUTPUTSTREAM_H_
#define _DECAF_IO_BYTEARRAYOUTPUTSTREAM_H_
+#include <decaf/util/Config.h>
+
#include <decaf/io/OutputStream.h>
-#include <vector>
+#include <decaf/lang/exceptions/IllegalArgumentException.h>
+
+#include <utility>
namespace decaf{
namespace io{
@@ -28,14 +32,19 @@ namespace io{
private:
/**
- * Default buffer to use, if none provided.
+ * The internal buffer used to hold written bytes.
*/
- std::vector<unsigned char> defaultBuffer;
+ unsigned char* buffer;
/**
- * Reference to the buffer being used by this stream.
+ * Current Size of the buffer.
*/
- std::vector<unsigned char>* activeBuffer;
+ int bufferSize;
+
+ /**
+ * The number of bytes currently held in the buffer.
+ */
+ int count;
private:
@@ -45,44 +54,41 @@ namespace io{
public:
/**
- * Default Constructor - uses a default internal buffer
+ * Default Constructor - uses a default internal buffer of 32 bytes, the size
+ * increases as the need for more room arises.
*/
ByteArrayOutputStream();
/**
- * Uses the given buffer as the target. Calls setBuffer.
- * @param buffer the target buffer.
+ * Creates a ByteArrayOutputStream with an internal buffer allocated with the
+ * given size.
+ *
+ * @param bufferSize
+ * The size to use for the internal buffer.
+ *
+ * @throw IllegalArgumentException if the size is less than or equal to zero.
*/
- ByteArrayOutputStream( std::vector<unsigned char>& buffer );
+ ByteArrayOutputStream( int bufferSize )
+ throw( decaf::lang::exceptions::IllegalArgumentException );
virtual ~ByteArrayOutputStream();
/**
- * Sets the internal buffer. This input stream will wrap around
- * the given buffer and all writes will be performed directly on
- * the buffer. This object does not retain control of the buffer's
- * lifetime however - this is the job of the caller.
- * @param buffer The target buffer.
- */
- virtual void setBuffer( std::vector<unsigned char>& buffer );
-
- /**
- * Get a snapshot of the data
- * @return pointer to the data
- */
- virtual const unsigned char* toByteArray() const;
-
- /**
- * Get a snapshot of the data
- * @return reference to the underlying data as a const std::vector<unsigned char>&
+ * Creates a newly allocated byte array. Its size is the current size of this output
+ * stream and the valid contents of the buffer have been copied into it. The newly
+ * allocated array and its size are returned inside an STL pair structure, the caller
+ * is responsible for freeing the returned array.
+ *
+ * @return an STL pair containing the copied array and its size.
*/
- virtual const std::vector<unsigned char>& toByteArrayRef() const;
+ std::pair<const unsigned char*, int> toByteArray() const;
/**
- * Get the Size of the Internal Buffer
- * @return size of the internal buffer
+ * Gets the current count of bytes written into this ByteArrayOutputStream.
+ *
+ * @return the number of valid bytes contained in the ByteArrayOutputStream.
*/
- virtual long long size() const;
+ long long size() const;
/**
* Clear current Stream contents
@@ -114,6 +120,11 @@ namespace io{
decaf::lang::exceptions::NullPointerException,
decaf::lang::exceptions::IndexOutOfBoundsException );
+ private:
+
+ // Expands the buffer if there's not enough room for the needed length.
+ void checkExpandSize( int needed );
+
};
}}
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/DataOutputStreamBenchmark.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/DataOutputStreamBenchmark.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/DataOutputStreamBenchmark.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/DataOutputStreamBenchmark.cpp Mon Mar 29 19:39:39 2010
@@ -37,10 +37,9 @@ void DataOutputStreamBenchmark::setUp(){
////////////////////////////////////////////////////////////////////////////////
void DataOutputStreamBenchmark::run(){
- std::vector<unsigned char> outputBuffer;
int numRuns = 500;
- ByteArrayOutputStream bos( outputBuffer );
+ ByteArrayOutputStream bos;
DataOutputStream dos( &bos );
for( int iy = 0; iy < numRuns * 40; ++iy ){
@@ -65,20 +64,20 @@ void DataOutputStreamBenchmark::run(){
dos.writeFloat( 32.4f );
}
- outputBuffer.clear();
+ bos.reset();
for( int iy = 0; iy < numRuns; ++iy ){
dos.writeChars( testString );
- outputBuffer.clear();
+ bos.reset();
}
for( int iy = 0; iy < numRuns; ++iy ){
dos.writeBytes( testString );
- outputBuffer.clear();
+ bos.reset();
}
for( int iy = 0; iy < numRuns; ++iy ){
dos.writeUTF( testString );
- outputBuffer.clear();
+ bos.reset();
}
- outputBuffer.clear();
+ bos.reset();
}
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/IOTransportTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/IOTransportTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/IOTransportTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/IOTransportTest.cpp Mon Mar 29 19:39:39 2010
@@ -328,8 +328,9 @@ void IOTransportTest::testWrite(){
cmd->c = '5';
transport.oneway( cmd );
- const unsigned char* bytes = os.toByteArray();
- std::size_t size = os.size();
+ std::pair<const unsigned char*, int> array = os.toByteArray();
+ const unsigned char* bytes = array.first;
+ std::size_t size = array.second;
CPPUNIT_ASSERT( size >= 5 );
CPPUNIT_ASSERT( bytes[0] == '1' );
CPPUNIT_ASSERT( bytes[1] == '2' );
@@ -337,6 +338,8 @@ void IOTransportTest::testWrite(){
CPPUNIT_ASSERT( bytes[3] == '4' );
CPPUNIT_ASSERT( bytes[4] == '5' );
+ delete [] array.first;
+
transport.close();
}
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/MarshallingSupportTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/MarshallingSupportTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/MarshallingSupportTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/MarshallingSupportTest.cpp Mon Mar 29 19:39:39 2010
@@ -193,10 +193,13 @@ void MarshallingSupportTest::testWriteSt
MarshallingSupport::writeString( writer, "" );
- bais.setByteArray( baos.toByteArray(), (int)baos.size() );
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ bais.setByteArray( array.first, array.second );
CPPUNIT_ASSERT( dataIn.read() == PrimitiveValueNode::STRING_TYPE );
CPPUNIT_ASSERT( dataIn.readShort() == 0 );
+
+ delete [] array.first;
}
{
ByteArrayOutputStream baos;
@@ -206,10 +209,13 @@ void MarshallingSupportTest::testWriteSt
MarshallingSupport::writeString( writer, "Hello World" );
- bais.setByteArray( baos.toByteArray(), (int)baos.size() );
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ bais.setByteArray( array.first, array.second );
CPPUNIT_ASSERT( dataIn.read() == PrimitiveValueNode::STRING_TYPE );
CPPUNIT_ASSERT( dataIn.readShort() == 11 );
+
+ delete [] array.first;
}
{
ByteArrayOutputStream baos;
@@ -219,10 +225,13 @@ void MarshallingSupportTest::testWriteSt
MarshallingSupport::writeString( writer, std::string( Short::MAX_VALUE, 'A' ) );
- bais.setByteArray( baos.toByteArray(), (int)baos.size() );
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ bais.setByteArray( array.first, array.second );
CPPUNIT_ASSERT( dataIn.read() == PrimitiveValueNode::BIG_STRING_TYPE );
CPPUNIT_ASSERT( dataIn.readInt() == Short::MAX_VALUE );
+
+ delete [] array.first;
}
}
@@ -236,9 +245,13 @@ void MarshallingSupportTest::testWriteSt
DataInputStream dataIn( &bais );
MarshallingSupport::writeString16( writer, "Hello World" );
- bais.setByteArray( baos.toByteArray(), (int)baos.size() );
+
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ bais.setByteArray( array.first, array.second );
CPPUNIT_ASSERT( dataIn.readShort() == 11 );
+
+ delete [] array.first;
}
}
@@ -252,9 +265,13 @@ void MarshallingSupportTest::testWriteSt
DataInputStream dataIn( &bais );
MarshallingSupport::writeString32( writer, "Hello World" );
- bais.setByteArray( baos.toByteArray(), (int)baos.size() );
+
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ bais.setByteArray( array.first, array.second );
CPPUNIT_ASSERT( dataIn.readInt() == 11 );
+
+ delete [] array.first;
}
}
@@ -272,7 +289,8 @@ void MarshallingSupportTest::testReadStr
MarshallingSupport::writeString( dataOut, testStr );
// Move the output back to the input.
- bytesIn.setByteArray( bytesOut.toByteArray(), (int)bytesOut.size() );
+ std::pair<const unsigned char*, int> array = bytesOut.toByteArray();
+ bytesIn.setByteArray( array.first, array.second );
string resultStr = "";
int type = dataIn.read();
@@ -284,6 +302,8 @@ void MarshallingSupportTest::testReadStr
resultStr = MarshallingSupport::readString16( dataIn ) );
CPPUNIT_ASSERT( testStr == resultStr );
+
+ delete [] array.first;
}
////////////////////////////////////////////////////////////////////////////////
@@ -300,7 +320,8 @@ void MarshallingSupportTest::testReadStr
MarshallingSupport::writeString( dataOut, testStr );
// Move the output back to the input.
- bytesIn.setByteArray( bytesOut.toByteArray(), (int)bytesOut.size() );
+ std::pair<const unsigned char*, int> array = bytesOut.toByteArray();
+ bytesIn.setByteArray( array.first, array.second );
string resultStr = "";
int type = dataIn.read();
@@ -312,4 +333,6 @@ void MarshallingSupportTest::testReadStr
resultStr = MarshallingSupport::readString32( dataIn ) );
CPPUNIT_ASSERT( testStr == resultStr );
+
+ delete [] array.first;
}
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/BaseDataStreamMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/BaseDataStreamMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/BaseDataStreamMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/BaseDataStreamMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -84,7 +84,8 @@ void BaseDataStreamMarshallerTest::testL
complexMarshaller->looseMarshal( &openWireFormat, dataStructure, &looseOut );
// 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 );
DataInputStream looseIn( &bais );
unsigned char dataType = looseIn.readByte();
@@ -107,6 +108,8 @@ void BaseDataStreamMarshallerTest::testL
CPPUNIT_ASSERT_EQUAL( dataStructure->cachedChild->floatValue, ds.cachedChild->floatValue );
CPPUNIT_ASSERT_EQUAL( dataStructure->cachedChild->doubleValue, ds.cachedChild->doubleValue );
CPPUNIT_ASSERT_EQUAL( dataStructure->cachedChild->stringValue, ds.cachedChild->stringValue );
+
+ delete [] array.first;
}
////////////////////////////////////////////////////////////////////////////////
@@ -135,7 +138,8 @@ void BaseDataStreamMarshallerTest::testT
complexMarshaller->tightMarshal2( &openWireFormat, dataStructure, &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 );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
@@ -160,4 +164,6 @@ void BaseDataStreamMarshallerTest::testT
CPPUNIT_ASSERT_EQUAL( dataStructure->cachedChild->floatValue, ds.cachedChild->floatValue );
CPPUNIT_ASSERT_EQUAL( dataStructure->cachedChild->doubleValue, ds.cachedChild->doubleValue );
CPPUNIT_ASSERT_EQUAL( dataStructure->cachedChild->stringValue, ds.cachedChild->stringValue );
+
+ delete [] array.first;
}
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQBlobMessageMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQBlobMessageMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQBlobMessageMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQBlobMessageMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -100,7 +100,8 @@ void ActiveMQBlobMessageMarshallerTest::
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() );
@@ -158,7 +159,8 @@ void ActiveMQBlobMessageMarshallerTest::
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/v1/ActiveMQBytesMessageMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQBytesMessageMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQBytesMessageMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQBytesMessageMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -100,7 +100,8 @@ void ActiveMQBytesMessageMarshallerTest:
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() );
@@ -158,7 +159,8 @@ void ActiveMQBytesMessageMarshallerTest:
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/v1/ActiveMQMapMessageMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQMapMessageMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQMapMessageMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQMapMessageMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -100,7 +100,8 @@ void ActiveMQMapMessageMarshallerTest::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() );
@@ -158,7 +159,8 @@ void ActiveMQMapMessageMarshallerTest::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/v1/ActiveMQMessageMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQMessageMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQMessageMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQMessageMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -100,7 +100,8 @@ void ActiveMQMessageMarshallerTest::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() );
@@ -158,7 +159,8 @@ void ActiveMQMessageMarshallerTest::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/v1/ActiveMQObjectMessageMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQObjectMessageMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQObjectMessageMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQObjectMessageMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -100,7 +100,8 @@ void ActiveMQObjectMessageMarshallerTest
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() );
@@ -158,7 +159,8 @@ void ActiveMQObjectMessageMarshallerTest
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/v1/ActiveMQQueueMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQQueueMarshallerTest.cpp?rev=928883&r1=928882&r2=928883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQQueueMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQQueueMarshallerTest.cpp Mon Mar 29 19:39:39 2010
@@ -88,7 +88,8 @@ void ActiveMQQueueMarshallerTest::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 ActiveMQQueueMarshallerTest::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();