activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r551577 - /activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/io/DataInputStream.cpp
Date Thu, 28 Jun 2007 14:35:36 GMT
Author: tabish
Date: Thu Jun 28 07:35:35 2007
New Revision: 551577

URL: http://svn.apache.org/viewvc?view=rev&rev=551577
Log:
http://issues.apache.org/activemq/browse/AMQCPP-103

Building Decaf lib

Modified:
    activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/io/DataInputStream.cpp

Modified: activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/io/DataInputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/io/DataInputStream.cpp?view=diff&rev=551577&r1=551576&r2=551577
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/io/DataInputStream.cpp (original)
+++ activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/io/DataInputStream.cpp Thu Jun 28
07:35:35 2007
@@ -85,10 +85,7 @@
 
     try {
         unsigned char value = 0;
-
-        // Get the data in one shot, will throw EOF or IO Exception as needed.
         readAllData( &value, sizeof(value) );
-
         return (bool)( value != 0 );
     }
     DECAF_CATCH_RETHROW( EOFException )
@@ -102,10 +99,7 @@
 
     try {
         unsigned char value = 0;
-
-        // Get the data in one shot, will throw EOF or IO Exception as needed.
         readAllData( &value, sizeof(value) );
-
         return (char)( value );
     }
     DECAF_CATCH_RETHROW( EOFException )
@@ -119,10 +113,7 @@
 
     try {
         unsigned char value = 0;
-
-        // Get the data in one shot, will throw EOF or IO Exception as needed.
         readAllData( &value, sizeof(value) );
-
         return value;
     }
     DECAF_CATCH_RETHROW( EOFException )
@@ -134,10 +125,7 @@
 char DataInputStream::readChar() throw ( IOException, EOFException ) {
     try {
         unsigned char value = 0;
-
-        // Get the data in one shot, will throw EOF or IO Exception as needed.
         readAllData( &value, sizeof(value) );
-
         return (char)( value );
     }
     DECAF_CATCH_RETHROW( EOFException )
@@ -150,12 +138,8 @@
     try {
         short value = 0;
         unsigned char buffer[sizeof(value)] = {0};
-
-        // Get the data in one shot, will throw EOF or IO Exception as needed.
         readAllData( buffer, sizeof(value) );
-
         value |= (buffer[0] << 8 | buffer[1] << 0);
-
         return value;
     }
     DECAF_CATCH_RETHROW( EOFException )
@@ -167,15 +151,10 @@
 unsigned short DataInputStream::readUnsignedShort()
     throw ( io::IOException, io::EOFException ) {
     try {
-
         unsigned short value = 0;
         unsigned char buffer[sizeof(value)] = {0};
-
-        // Get the data in one shot, will throw EOF or IO Exception as needed.
         readAllData( buffer, sizeof(value) );
-
         value |= (buffer[0] << 8 | buffer[1] << 0);
-
         return value;
     }
     DECAF_CATCH_RETHROW( EOFException )
@@ -186,16 +165,11 @@
 ////////////////////////////////////////////////////////////////////////////////
 int DataInputStream::readInt() throw ( io::IOException, io::EOFException ) {
     try {
-
         unsigned int value = 0;
         unsigned char buffer[sizeof(value)] = {0};
-
-        // Get the data in one shot, will throw EOF or IO Exception as needed.
         readAllData( buffer, sizeof(value) );
-
         value |= (buffer[0] << 24 | buffer[1] << 16 |
                   buffer[2] << 8 | buffer[3] << 0);
-
         return value;
     }
     DECAF_CATCH_RETHROW( EOFException )
@@ -206,7 +180,6 @@
 ////////////////////////////////////////////////////////////////////////////////
 double DataInputStream::readDouble() throw ( io::IOException, io::EOFException ) {
     try {
-
         unsigned long long lvalue = this->readLong();
         double value = 0.0;
         memcpy( &value, &lvalue, sizeof( unsigned long long ) );
@@ -220,7 +193,6 @@
 ////////////////////////////////////////////////////////////////////////////////
 float DataInputStream::readFloat() throw ( io::IOException, io::EOFException ) {
     try {
-
         unsigned int lvalue = this->readInt();
         float value = 0.0f;
         memcpy( &value, &lvalue, sizeof( unsigned int ) );
@@ -235,11 +207,8 @@
 long long DataInputStream::readLong()
     throw ( io::IOException, io::EOFException ) {
     try {
-
         unsigned long long value = 0;
         unsigned char buffer[sizeof(value)] = {0};
-
-        // Get the data in one shot, will throw EOF or IO Exception as needed.
         readAllData( buffer, sizeof(value) );
 
         // Have to do it this way because on Solaris and Cygwin we get all
@@ -267,7 +236,6 @@
 std::string DataInputStream::readString()
     throw ( io::IOException, io::EOFException ) {
     try {
-
         size_t size = 1024;
         std::vector<char> buffer;
         buffer.resize( size );



Mime
View raw message