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 15:32:38 UTC
svn commit: r928770 [1/6] - in
/activemq/activemq-cpp/trunk/activemq-cpp/src: main/decaf/io/
test/activemq/wireformat/openwire/marshal/v1/
test/activemq/wireformat/openwire/marshal/v2/
test/activemq/wireformat/openwire/marshal/v3/ test/activemq/wirefor...
Author: tabish
Date: Mon Mar 29 13:32:32 2010
New Revision: 928770
URL: http://svn.apache.org/viewvc?rev=928770&view=rev
Log:
Rewrite the ByteArrayInputStream for a major performance improvement, and fix the test code that used it so remove some warnings with type conversions.
Modified:
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/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/decaf/io/ByteArrayInputStreamTest.cpp
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/InputStreamReaderTest.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/PropertiesTest.cpp
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=928770&r1=928769&r2=928770&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 13:32:32 2010
@@ -16,7 +16,8 @@
*/
#include "ByteArrayInputStream.h"
-#include <algorithm>
+
+#include <decaf/lang/System.h>
using namespace std;
using namespace decaf;
@@ -25,21 +26,35 @@ using namespace decaf::lang;
using namespace decaf::lang::exceptions;
////////////////////////////////////////////////////////////////////////////////
-ByteArrayInputStream::ByteArrayInputStream(){
- this->activeBuffer = NULL;
+ByteArrayInputStream::ByteArrayInputStream() :
+ InputStream(), buffer( NULL ), size( 0 ), count( 0 ), pos( 0 ), markpos( 0 ){
}
////////////////////////////////////////////////////////////////////////////////
-ByteArrayInputStream::ByteArrayInputStream( const vector<unsigned char>& buffer ){
- setBuffer(buffer);
+ByteArrayInputStream::ByteArrayInputStream( const vector<unsigned char>& buffer ) :
+ InputStream(), buffer( NULL ), size( 0 ), count( 0 ), pos( 0 ), markpos( 0 ) {
+
+ if( buffer.size() > 0 ) {
+ setByteArray( &buffer[0], (int)buffer.size(), 0, (int)buffer.size() );
+ }
}
////////////////////////////////////////////////////////////////////////////////
-ByteArrayInputStream::ByteArrayInputStream( const unsigned char* buffer, long long bufferSize )
+ByteArrayInputStream::ByteArrayInputStream( const unsigned char* buffer, int bufferSize )
throw( decaf::lang::exceptions::NullPointerException,
- decaf::lang::exceptions::IllegalArgumentException ) {
+ decaf::lang::exceptions::IllegalArgumentException ) :
+ InputStream(), buffer( NULL ), size( 0 ), count( 0 ), pos( 0 ), markpos( 0 ){
+
+ setByteArray( buffer, bufferSize, 0, bufferSize );
+}
- setByteArray( buffer, bufferSize );
+////////////////////////////////////////////////////////////////////////////////
+ByteArrayInputStream::ByteArrayInputStream( const unsigned char* buffer, int bufferSize, int offset, int length )
+ throw( decaf::lang::exceptions::NullPointerException,
+ decaf::lang::exceptions::IllegalArgumentException ) :
+ InputStream(), buffer( NULL ), size( 0 ), count( 0 ), pos( 0 ), markpos( 0 ){
+
+ setByteArray( buffer, bufferSize, offset, length );
}
////////////////////////////////////////////////////////////////////////////////
@@ -47,18 +62,23 @@ ByteArrayInputStream::~ByteArrayInputStr
}
////////////////////////////////////////////////////////////////////////////////
-void ByteArrayInputStream::setBuffer( const vector<unsigned char>& buffer ){
+void ByteArrayInputStream::setByteArray( const vector<unsigned char>& buffer ){
- // We're using the default buffer.
- this->activeBuffer = &buffer;
+ if( buffer.size() > 0 ) {
+ setByteArray( &buffer[0], (int)buffer.size(), 0, (int)buffer.size() );
+ }
+}
- // Start the stream off at the beginning marking begin as the reset point.
- this->markpos = this->activeBuffer->begin();
- this->pos = this->markpos;
+////////////////////////////////////////////////////////////////////////////////
+void ByteArrayInputStream::setByteArray( const unsigned char* buffer, int bufferSize )
+ throw( decaf::lang::exceptions::NullPointerException,
+ decaf::lang::exceptions::IllegalArgumentException ) {
+
+ setByteArray( buffer, bufferSize, 0, bufferSize );
}
////////////////////////////////////////////////////////////////////////////////
-void ByteArrayInputStream::setByteArray( const unsigned char* buffer, long long bufferSize )
+void ByteArrayInputStream::setByteArray( const unsigned char* buffer, int bufferSize, int offset, int length )
throw( decaf::lang::exceptions::NullPointerException,
decaf::lang::exceptions::IllegalArgumentException ) {
@@ -72,31 +92,28 @@ void ByteArrayInputStream::setByteArray(
__FILE__, __LINE__, "Size given for input buffer was negative." );
}
- // We're using the default buffer.
- this->activeBuffer = &this->defaultBuffer;
+ if( offset < 0 ) {
+ throw IllegalArgumentException(
+ __FILE__, __LINE__, "Offset given was negative: %d.", offset );
+ }
- // Remove old data
- this->defaultBuffer.clear();
- this->defaultBuffer.reserve( (std::size_t)bufferSize );
-
- // Copy data to internal buffer.
- this->defaultBuffer.insert( this->defaultBuffer.begin(), buffer, buffer + bufferSize );
-
- // Start the stream off at the beginning marking begin as the reset point.
- this->markpos = this->activeBuffer->begin();
- this->pos = this->markpos;
+ if( length < 0 ) {
+ throw IllegalArgumentException(
+ __FILE__, __LINE__, "Length given was negative: %d.", offset );
+ }
+
+ // We're using the default buffer.
+ this->buffer = buffer;
+ this->size = bufferSize;
+ this->pos = offset;
+ this->markpos = offset;
+ this->count = offset + length > bufferSize ? bufferSize : offset + length;
}
////////////////////////////////////////////////////////////////////////////////
int ByteArrayInputStream::available() const throw ( IOException ) {
- if( activeBuffer == NULL ){
- throw IOException(
- __FILE__, __LINE__,
- "buffer has not been initialized");
- }
-
- return (int)std::distance( pos, activeBuffer->end() );
+ return this->count - this->pos;
}
////////////////////////////////////////////////////////////////////////////////
@@ -104,7 +121,7 @@ void ByteArrayInputStream::mark( int rea
// the reset point is now the marked position until a new byte buffer
// is set on this stream.
- this->markpos = pos;
+ this->markpos = this->pos;
}
////////////////////////////////////////////////////////////////////////////////
@@ -112,13 +129,9 @@ void ByteArrayInputStream::reset() throw
try{
- if( activeBuffer == NULL ){
- throw IOException( __FILE__, __LINE__, "Buffer has not been initialized" );
- }
-
// Begin at the Beginning if mark hasn't been called otherwise it
// starts at the marked pos.
- pos = this->markpos;
+ this->pos = this->markpos;
}
DECAF_CATCH_RETHROW( IOException )
DECAF_CATCHALL_THROW( IOException )
@@ -128,18 +141,7 @@ void ByteArrayInputStream::reset() throw
int ByteArrayInputStream::doReadByte() throw ( IOException ){
try{
-
- if( activeBuffer == NULL ){
- throw IOException(
- __FILE__, __LINE__,
- "ByteArrayInputStream::read - Buffer has not been initialized" );
- }
-
- if( pos == activeBuffer->end() ){
- return -1;
- }
-
- return *(pos++);
+ return pos < count ? buffer[pos++] : -1;
}
DECAF_CATCH_RETHROW( IOException )
DECAF_CATCHALL_THROW( IOException )
@@ -158,12 +160,6 @@ int ByteArrayInputStream::doReadArrayBou
return 0;
}
- if( activeBuffer == NULL ){
- throw IOException(
- __FILE__, __LINE__,
- "ByteArrayInputStream::read - Buffer has not been initialized" );
- }
-
if( buffer == NULL ) {
throw NullPointerException(
__FILE__, __LINE__,
@@ -185,24 +181,14 @@ int ByteArrayInputStream::doReadArrayBou
__FILE__, __LINE__, "length parameter out of Bounds: %d.", length );
}
- int ix = 0;
-
- if( pos == activeBuffer->end() ) {
+ if( this->pos >= this->count ) {
return -1;
}
- // How far are we from end
- int remaining = (int)distance( pos, activeBuffer->end() );
-
- // We only read as much as is left if the amount remaining is less than
- // the amount of data asked for.
- length = remaining < length ? remaining : length;
-
- for( ; ix < length; ++ix, ++pos) {
- buffer[ix + offset] = *(pos);
- }
-
- return ix;
+ int copylen = this->count - this->pos < length ? this->count - this->pos : length;
+ System::arraycopy( this->buffer, this->pos, buffer, offset, copylen );
+ this->pos += copylen;
+ return copylen;
}
DECAF_CATCH_RETHROW( IOException )
DECAF_CATCH_RETHROW( IndexOutOfBoundsException )
@@ -216,19 +202,13 @@ long long ByteArrayInputStream::skip( lo
try{
- if( activeBuffer == NULL ){
- throw IOException(
- __FILE__, __LINE__,
- "ByteArrayInputStream::skip - Buffer has not been initialized" );
+ if( num <= 0 ) {
+ return 0;
}
- long long ix = 0;
-
- // Increment the position until we've skipped the desired number
- // or we've hit the end of the buffer.
- for( ; ix < num && pos != activeBuffer->end(); ++ix, ++pos) {}
-
- return ix;
+ int temp = this->pos;
+ this->pos = this->count - this->pos < num ? this->count : (int)(this->pos + num);
+ return this->pos - temp;
}
DECAF_CATCH_RETHROW( IOException )
DECAF_CATCHALL_THROW( IOException )
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=928770&r1=928769&r2=928770&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 13:32:32 2010
@@ -27,34 +27,57 @@ namespace decaf{
namespace io{
/**
- * Simple implementation of InputStream that wraps around an STL Vector
- * std::vector<unsigned char>.
+ * A ByteArrayInputStream contains an internal buffer that contains bytes that may be read from
+ * 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.
*
- * Closing a ByteArrayInputStream has no effect. The methods in this class can be
- * called after the stream has been closed without generating an IOException.
+ * Closing a ByteArrayInputStream has no effect. The methods in this class can be called after
+ * the stream has been closed without generating an IOException.
+ *
+ * @since 1.0
*/
class DECAF_API ByteArrayInputStream : public InputStream {
private:
/**
- * Default buffer to use, if none provided.
+ * An array of bytes that was provided by the creator of the stream. Elements buffer[0]
+ * through buffer[count-1] are the only bytes that can ever be read from the stream; element
+ * buffer[pos] is the next byte to be read.
*/
- std::vector<unsigned char> defaultBuffer;
+ const unsigned char* buffer;
/**
- * Reference to the buffer being used by this stream.
+ * The Size of the input buffer.
*/
- const std::vector<unsigned char>* activeBuffer;
+ int size;
/**
- * iterator to current position in buffer.
+ * 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
+ * input stream buffer.
*/
- std::vector<unsigned char>::const_iterator pos;
+ int count;
/**
- * The currently marked position or begin() of activeBuffer.
+ * The index of the next character to read from the input stream buffer. This value should
+ * always be nonnegative and not larger than the value of count. The next byte to be read
+ * from the input stream buffer will be buffer[pos].
+ */
+ int pos;
+
+ /**
+ * The currently marked position in the stream. ByteArrayInputStream objects are marked at
+ * position zero by default when constructed. They may be marked at another position within
+ * the buffer by the mark() method. The current buffer position is set to this point by the
+ * reset() method.
+ *
+ * If no mark has been set, then the value of mark is the offset passed to the constructor
+ * (or 0 if the offset was not supplied).
*/
- std::vector<unsigned char>::const_iterator markpos;
+ int markpos;
private:
@@ -63,6 +86,10 @@ namespace io{
public:
+ /**
+ * Creates an ByteArrayInputStream with an empty input buffer, the buffer can be
+ * initialized with a call to setByteArray.
+ */
ByteArrayInputStream();
/**
@@ -86,7 +113,27 @@ namespace io{
* @throws NullPointerException if the buffer is Null.
* @throws IllegalArguementException if the bufferSize is negative.
*/
- ByteArrayInputStream( const unsigned char* buffer, long long bufferSize )
+ ByteArrayInputStream( const unsigned char* buffer, int bufferSize )
+ throw( decaf::lang::exceptions::NullPointerException,
+ decaf::lang::exceptions::IllegalArgumentException );
+
+ /**
+ * Create an instance of the ByteArrayInputStream with the given buffer as
+ * the source of input for all read operations.
+ *
+ * @param buffer
+ * The initial byte array to use to read from.
+ * @param bufferSize
+ * The size of the buffer.
+ * @param offset
+ * The offset into the buffer to begin reading from.
+ * @param length
+ * The number of bytes to read past the offset.
+ *
+ * @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 )
throw( decaf::lang::exceptions::NullPointerException,
decaf::lang::exceptions::IllegalArgumentException );
@@ -103,7 +150,23 @@ namespace io{
* @param buffer
* The buffer to be used.
*/
- virtual void setBuffer( const std::vector<unsigned char>& buffer );
+ virtual void setByteArray( const std::vector<unsigned char>& buffer );
+
+ /**
+ * Sets the data that this reader uses, replaces any existing
+ * data and resets to beginning of the buffer.
+ *
+ * @param buffer
+ * The initial byte array to use to read from.
+ * @param bufferSize
+ * The size of the buffer.
+ *
+ * @throws NullPointerException if the buffer is Null.
+ * @throws IllegalArguementException if the bufferSize is negative.
+ */
+ virtual void setByteArray( const unsigned char* buffer, int bufferSize )
+ throw( decaf::lang::exceptions::NullPointerException,
+ decaf::lang::exceptions::IllegalArgumentException );
/**
* Sets the data that this reader uses, replaces any existing
@@ -113,11 +176,15 @@ namespace io{
* The initial byte array to use to read from.
* @param bufferSize
* The size of the buffer.
+ * @param offset
+ * The offset into the buffer to begin reading from.
+ * @param length
+ * The number of bytes to read past the offset.
*
* @throws NullPointerException if the buffer is Null.
* @throws IllegalArguementException if the bufferSize is negative.
*/
- virtual void setByteArray( const unsigned char* buffer, long long bufferSize )
+ virtual void setByteArray( const unsigned char* buffer, int bufferSize, int offset, int length )
throw( decaf::lang::exceptions::NullPointerException,
decaf::lang::exceptions::IllegalArgumentException );
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=928770&r1=928769&r2=928770&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 13:32:32 2010
@@ -100,7 +100,7 @@ void ActiveMQBlobMessageMarshallerTest::
marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -158,7 +158,7 @@ void ActiveMQBlobMessageMarshallerTest::
marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
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=928770&r1=928769&r2=928770&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 13:32:32 2010
@@ -100,7 +100,7 @@ void ActiveMQBytesMessageMarshallerTest:
marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -158,7 +158,7 @@ void ActiveMQBytesMessageMarshallerTest:
marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
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=928770&r1=928769&r2=928770&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 13:32:32 2010
@@ -100,7 +100,7 @@ void ActiveMQMapMessageMarshallerTest::t
marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -158,7 +158,7 @@ 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(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
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=928770&r1=928769&r2=928770&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 13:32:32 2010
@@ -100,7 +100,7 @@ void ActiveMQMessageMarshallerTest::test
marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -158,7 +158,7 @@ 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(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
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=928770&r1=928769&r2=928770&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 13:32:32 2010
@@ -100,7 +100,7 @@ void ActiveMQObjectMessageMarshallerTest
marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -158,7 +158,7 @@ void ActiveMQObjectMessageMarshallerTest
marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
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=928770&r1=928769&r2=928770&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 13:32:32 2010
@@ -88,7 +88,7 @@ void ActiveMQQueueMarshallerTest::testLo
marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +134,7 @@ 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(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQStreamMessageMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQStreamMessageMarshallerTest.cpp?rev=928770&r1=928769&r2=928770&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQStreamMessageMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQStreamMessageMarshallerTest.cpp Mon Mar 29 13:32:32 2010
@@ -100,7 +100,7 @@ void ActiveMQStreamMessageMarshallerTest
marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -158,7 +158,7 @@ void ActiveMQStreamMessageMarshallerTest
marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQTempQueueMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQTempQueueMarshallerTest.cpp?rev=928770&r1=928769&r2=928770&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQTempQueueMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQTempQueueMarshallerTest.cpp Mon Mar 29 13:32:32 2010
@@ -88,7 +88,7 @@ void ActiveMQTempQueueMarshallerTest::te
marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +134,7 @@ void ActiveMQTempQueueMarshallerTest::te
marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQTempTopicMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQTempTopicMarshallerTest.cpp?rev=928770&r1=928769&r2=928770&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQTempTopicMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQTempTopicMarshallerTest.cpp Mon Mar 29 13:32:32 2010
@@ -88,7 +88,7 @@ void ActiveMQTempTopicMarshallerTest::te
marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +134,7 @@ void ActiveMQTempTopicMarshallerTest::te
marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQTextMessageMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQTextMessageMarshallerTest.cpp?rev=928770&r1=928769&r2=928770&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQTextMessageMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQTextMessageMarshallerTest.cpp Mon Mar 29 13:32:32 2010
@@ -100,7 +100,7 @@ void ActiveMQTextMessageMarshallerTest::
marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -158,7 +158,7 @@ void ActiveMQTextMessageMarshallerTest::
marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQTopicMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQTopicMarshallerTest.cpp?rev=928770&r1=928769&r2=928770&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQTopicMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ActiveMQTopicMarshallerTest.cpp Mon Mar 29 13:32:32 2010
@@ -88,7 +88,7 @@ void ActiveMQTopicMarshallerTest::testLo
marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +134,7 @@ void ActiveMQTopicMarshallerTest::testTi
marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/BrokerIdMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/BrokerIdMarshallerTest.cpp?rev=928770&r1=928769&r2=928770&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/BrokerIdMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/BrokerIdMarshallerTest.cpp Mon Mar 29 13:32:32 2010
@@ -88,7 +88,7 @@ void BrokerIdMarshallerTest::testLooseMa
marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +134,7 @@ void BrokerIdMarshallerTest::testTightMa
marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/BrokerInfoMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/BrokerInfoMarshallerTest.cpp?rev=928770&r1=928769&r2=928770&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/BrokerInfoMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/BrokerInfoMarshallerTest.cpp Mon Mar 29 13:32:32 2010
@@ -88,7 +88,7 @@ void BrokerInfoMarshallerTest::testLoose
marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +134,7 @@ void BrokerInfoMarshallerTest::testTight
marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConnectionControlMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConnectionControlMarshallerTest.cpp?rev=928770&r1=928769&r2=928770&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConnectionControlMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConnectionControlMarshallerTest.cpp Mon Mar 29 13:32:32 2010
@@ -88,7 +88,7 @@ void ConnectionControlMarshallerTest::te
marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +134,7 @@ void ConnectionControlMarshallerTest::te
marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConnectionErrorMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConnectionErrorMarshallerTest.cpp?rev=928770&r1=928769&r2=928770&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConnectionErrorMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConnectionErrorMarshallerTest.cpp Mon Mar 29 13:32:32 2010
@@ -88,7 +88,7 @@ void ConnectionErrorMarshallerTest::test
marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +134,7 @@ void ConnectionErrorMarshallerTest::test
marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConnectionIdMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConnectionIdMarshallerTest.cpp?rev=928770&r1=928769&r2=928770&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConnectionIdMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConnectionIdMarshallerTest.cpp Mon Mar 29 13:32:32 2010
@@ -88,7 +88,7 @@ void ConnectionIdMarshallerTest::testLoo
marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +134,7 @@ void ConnectionIdMarshallerTest::testTig
marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConnectionInfoMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConnectionInfoMarshallerTest.cpp?rev=928770&r1=928769&r2=928770&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConnectionInfoMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConnectionInfoMarshallerTest.cpp Mon Mar 29 13:32:32 2010
@@ -88,7 +88,7 @@ void ConnectionInfoMarshallerTest::testL
marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +134,7 @@ void ConnectionInfoMarshallerTest::testT
marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConsumerControlMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConsumerControlMarshallerTest.cpp?rev=928770&r1=928769&r2=928770&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConsumerControlMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConsumerControlMarshallerTest.cpp Mon Mar 29 13:32:32 2010
@@ -88,7 +88,7 @@ void ConsumerControlMarshallerTest::test
marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +134,7 @@ void ConsumerControlMarshallerTest::test
marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConsumerIdMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConsumerIdMarshallerTest.cpp?rev=928770&r1=928769&r2=928770&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConsumerIdMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConsumerIdMarshallerTest.cpp Mon Mar 29 13:32:32 2010
@@ -88,7 +88,7 @@ void ConsumerIdMarshallerTest::testLoose
marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +134,7 @@ void ConsumerIdMarshallerTest::testTight
marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConsumerInfoMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConsumerInfoMarshallerTest.cpp?rev=928770&r1=928769&r2=928770&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConsumerInfoMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ConsumerInfoMarshallerTest.cpp Mon Mar 29 13:32:32 2010
@@ -88,7 +88,7 @@ void ConsumerInfoMarshallerTest::testLoo
marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +134,7 @@ void ConsumerInfoMarshallerTest::testTig
marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ControlCommandMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ControlCommandMarshallerTest.cpp?rev=928770&r1=928769&r2=928770&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ControlCommandMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/v1/ControlCommandMarshallerTest.cpp Mon Mar 29 13:32:32 2010
@@ -88,7 +88,7 @@ void ControlCommandMarshallerTest::testL
marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();
CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
@@ -134,7 +134,7 @@ void ControlCommandMarshallerTest::testT
marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
// Now read it back in and make sure it's all right.
- ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
+ ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );
DataInputStream dataIn( &bais );
unsigned char dataType = dataIn.readByte();