activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r426431 [11/14] - in /incubator/activemq/branches/activemq-4.0: activemq-core/src/gram/script/ activemq-core/src/main/java/org/apache/activemq/kaha/impl/ activemq-core/src/main/java/org/apache/activemq/openwire/v1/ activemq-core/src/test/ja...
Date Fri, 28 Jul 2006 08:22:55 GMT
Modified: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/ByteArrayInputStream.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/ByteArrayInputStream.cpp?rev=426431&r1=426430&r2=426431&view=diff
==============================================================================
--- incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/ByteArrayInputStream.cpp (original)
+++ incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/ByteArrayInputStream.cpp Fri Jul 28 01:22:48 2006
@@ -1,77 +1,77 @@
-/* 
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "ppr/io/ByteArrayInputStream.hpp"
-
-using namespace apache::ppr::io;
-
-/*
- *
- */
-ByteArrayInputStream::ByteArrayInputStream(array<char> buffer)
-{
-    this->body     = (buffer != NULL) ? buffer : NULL ;
-    this->bodySize = (buffer != NULL) ? (int)body.size() : 0 ;
-    this->offset   = 0 ;
-}
-
-/*
- *
- */
-ByteArrayInputStream::~ByteArrayInputStream()
-{
-    // no-op
-}
-
-void ByteArrayInputStream::close() throw(IOException)
-{
-    // no-op
-}
-
-/*
- *
- */
-array<char> ByteArrayInputStream::toArray()
-{
-    array<char> retBody ;
-
-    // Create return body and copy current contents
-    retBody = array<char> (bodySize) ;
-    memcpy(retBody.c_array(), body.c_array(), bodySize) ;
-
-    return retBody ;
-}
-
-/*
- *
- */
-int ByteArrayInputStream::read(char* buf, int index, int length) throw(IOException)
-{
-    // Check for EOF offset
-    if( offset > bodySize )
-        throw EOFException() ;
-
-    // Copy bytes from supplied buffer
-    for( int i = index ; i < length ; i++, offset++ )
-    {
-        // Check for body EOF
-        if( offset > bodySize )
-            return length - i ;
-
-        buf[i] = body[offset] ;
-    }
-    return length ;
-}
+/* 
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "ppr/io/ByteArrayInputStream.hpp"
+
+using namespace apache::ppr::io;
+
+/*
+ *
+ */
+ByteArrayInputStream::ByteArrayInputStream(array<char> buffer)
+{
+    this->body     = (buffer != NULL) ? buffer : NULL ;
+    this->bodySize = (buffer != NULL) ? (int)body.size() : 0 ;
+    this->offset   = 0 ;
+}
+
+/*
+ *
+ */
+ByteArrayInputStream::~ByteArrayInputStream()
+{
+    // no-op
+}
+
+void ByteArrayInputStream::close() throw(IOException)
+{
+    // no-op
+}
+
+/*
+ *
+ */
+array<char> ByteArrayInputStream::toArray()
+{
+    array<char> retBody ;
+
+    // Create return body and copy current contents
+    retBody = array<char> (bodySize) ;
+    memcpy(retBody.c_array(), body.c_array(), bodySize) ;
+
+    return retBody ;
+}
+
+/*
+ *
+ */
+int ByteArrayInputStream::read(char* buf, int index, int length) throw(IOException)
+{
+    // Check for EOF offset
+    if( offset > bodySize )
+        throw EOFException() ;
+
+    // Copy bytes from supplied buffer
+    for( int i = index ; i < length ; i++, offset++ )
+    {
+        // Check for body EOF
+        if( offset > bodySize )
+            return length - i ;
+
+        buf[i] = body[offset] ;
+    }
+    return length ;
+}

Propchange: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/ByteArrayInputStream.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/ByteArrayInputStream.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/ByteArrayInputStream.hpp?rev=426431&r1=426430&r2=426431&view=diff
==============================================================================
--- incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/ByteArrayInputStream.hpp (original)
+++ incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/ByteArrayInputStream.hpp Fri Jul 28 01:22:48 2006
@@ -1,59 +1,59 @@
-/* 
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef Ppr_ByteArrayInputStream_hpp_
-#define Ppr_ByteArrayInputStream_hpp_
-
-#include "ppr/io/DataInputStream.hpp"
-#include "ppr/io/EOFException.hpp"
-#include "ppr/util/ifr/array"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace io
-    {
-      using namespace ifr;
-
-/*
- * ByteArrayInputStream reads primitive C++ data types from an
- * in-memory byte array.
- */
-class ByteArrayInputStream : public DataInputStream
-{
-private:
-    array<char> body ;
-    int         bodySize,
-                offset ;
-
-public:
-    ByteArrayInputStream(array<char> buffer) ;
-    ~ByteArrayInputStream() ;
-
-    virtual array<char> toArray() ;
-
-    virtual void close() throw(IOException) ;
-    virtual int read(char* buffer, int index, int count) throw(IOException) ;
-} ;
-
-/* namespace */
-    }
-  }
-}
-
-#endif /*Ppr_ByteArrayInputStream_hpp_*/
+/* 
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef Ppr_ByteArrayInputStream_hpp_
+#define Ppr_ByteArrayInputStream_hpp_
+
+#include "ppr/io/DataInputStream.hpp"
+#include "ppr/io/EOFException.hpp"
+#include "ppr/util/ifr/array"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace io
+    {
+      using namespace ifr;
+
+/*
+ * ByteArrayInputStream reads primitive C++ data types from an
+ * in-memory byte array.
+ */
+class ByteArrayInputStream : public DataInputStream
+{
+private:
+    array<char> body ;
+    int         bodySize,
+                offset ;
+
+public:
+    ByteArrayInputStream(array<char> buffer) ;
+    ~ByteArrayInputStream() ;
+
+    virtual array<char> toArray() ;
+
+    virtual void close() throw(IOException) ;
+    virtual int read(char* buffer, int index, int count) throw(IOException) ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*Ppr_ByteArrayInputStream_hpp_*/

Propchange: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/ByteArrayInputStream.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/ByteArrayOutputStream.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/ByteArrayOutputStream.cpp?rev=426431&r1=426430&r2=426431&view=diff
==============================================================================
--- incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/ByteArrayOutputStream.cpp (original)
+++ incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/ByteArrayOutputStream.cpp Fri Jul 28 01:22:48 2006
@@ -1,122 +1,122 @@
-/* 
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "ppr/io/ByteArrayOutputStream.hpp"
-
-using namespace apache::ppr::io;
-
-/*
- *
- */
-ByteArrayOutputStream::ByteArrayOutputStream()
-{
-    this->body       = array<char> (INITIAL_SIZE) ;
-    this->bodySize   = INITIAL_SIZE ;
-    this->bodyLength = 0 ;
-    this->offset     = 0 ;
-}
-
-/*
- *
- */
-ByteArrayOutputStream::ByteArrayOutputStream(array<char> buffer)
-{
-    this->body       = (buffer != NULL ) ? buffer : array<char> (INITIAL_SIZE) ;
-    this->bodySize   = (int)body.size() ;
-    this->bodyLength = 0 ;
-    this->offset     = 0 ;
-}
-
-/*
- *
- */
-ByteArrayOutputStream::~ByteArrayOutputStream()
-{
-    // no-op
-}
-
-/*
- *
- */
-array<char> ByteArrayOutputStream::toArray()
-{
-    // Return NULL if no array content
-    if( bodyLength == 0 ) 
-        return NULL ;
-
-    // Create return body and copy current contents
-    array<char> retBody = array<char> (bodyLength) ;
-    memcpy(retBody.c_array(), body.c_array(), bodyLength) ;
-
-    return retBody ;
-}
-
-/*
- *
- */
-void ByteArrayOutputStream::close() throw(IOException)
-{
-    // no-op
-}
-
-/*
- *
- */
-void ByteArrayOutputStream::flush() throw(IOException)
-{
-    // no-op
-}
-
-/*
- *
- */
-int ByteArrayOutputStream::write(const char* buf, int index, int length) throw(IOException)
-{
-    // Assert buffer parameter
-    if( buf == NULL )
-        return 0 ;
-
-    // Copy bytes from supplied buffer
-    for( int i = index ; i < length ; i++, offset++ )
-    {
-        // Check for EOF offset
-        if( offset > bodySize )
-            expandBody() ;
-
-        body[offset] = buf[i] ;
-    }
-    // Update content length
-    bodyLength = offset ;
-
-    return length ;
-}
-
-/*
- *
- */
-void ByteArrayOutputStream::expandBody()
-{
-    array<char> newBody ;
-    int         newSize = bodySize + ByteArrayOutputStream::EXPAND_SIZE ;
-
-    // Create new body and copy current contents
-    newBody = array<char> (newSize) ;
-    memcpy(newBody.c_array(), body.c_array(), bodySize) ;
-
-    // Clean up and use new content body
-    body     = newBody ;
-    bodySize = newSize ;
-}
+/* 
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "ppr/io/ByteArrayOutputStream.hpp"
+
+using namespace apache::ppr::io;
+
+/*
+ *
+ */
+ByteArrayOutputStream::ByteArrayOutputStream()
+{
+    this->body       = array<char> (INITIAL_SIZE) ;
+    this->bodySize   = INITIAL_SIZE ;
+    this->bodyLength = 0 ;
+    this->offset     = 0 ;
+}
+
+/*
+ *
+ */
+ByteArrayOutputStream::ByteArrayOutputStream(array<char> buffer)
+{
+    this->body       = (buffer != NULL ) ? buffer : array<char> (INITIAL_SIZE) ;
+    this->bodySize   = (int)body.size() ;
+    this->bodyLength = 0 ;
+    this->offset     = 0 ;
+}
+
+/*
+ *
+ */
+ByteArrayOutputStream::~ByteArrayOutputStream()
+{
+    // no-op
+}
+
+/*
+ *
+ */
+array<char> ByteArrayOutputStream::toArray()
+{
+    // Return NULL if no array content
+    if( bodyLength == 0 ) 
+        return NULL ;
+
+    // Create return body and copy current contents
+    array<char> retBody = array<char> (bodyLength) ;
+    memcpy(retBody.c_array(), body.c_array(), bodyLength) ;
+
+    return retBody ;
+}
+
+/*
+ *
+ */
+void ByteArrayOutputStream::close() throw(IOException)
+{
+    // no-op
+}
+
+/*
+ *
+ */
+void ByteArrayOutputStream::flush() throw(IOException)
+{
+    // no-op
+}
+
+/*
+ *
+ */
+int ByteArrayOutputStream::write(const char* buf, int index, int length) throw(IOException)
+{
+    // Assert buffer parameter
+    if( buf == NULL )
+        return 0 ;
+
+    // Copy bytes from supplied buffer
+    for( int i = index ; i < length ; i++, offset++ )
+    {
+        // Check for EOF offset
+        if( offset > bodySize )
+            expandBody() ;
+
+        body[offset] = buf[i] ;
+    }
+    // Update content length
+    bodyLength = offset ;
+
+    return length ;
+}
+
+/*
+ *
+ */
+void ByteArrayOutputStream::expandBody()
+{
+    array<char> newBody ;
+    int         newSize = bodySize + ByteArrayOutputStream::EXPAND_SIZE ;
+
+    // Create new body and copy current contents
+    newBody = array<char> (newSize) ;
+    memcpy(newBody.c_array(), body.c_array(), bodySize) ;
+
+    // Clean up and use new content body
+    body     = newBody ;
+    bodySize = newSize ;
+}

Propchange: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/ByteArrayOutputStream.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/ByteArrayOutputStream.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/ByteArrayOutputStream.hpp?rev=426431&r1=426430&r2=426431&view=diff
==============================================================================
--- incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/ByteArrayOutputStream.hpp (original)
+++ incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/ByteArrayOutputStream.hpp Fri Jul 28 01:22:48 2006
@@ -1,67 +1,67 @@
-/* 
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef Ppr_ByteArrayOutputStream_hpp_
-#define Ppr_ByteArrayOutputStream_hpp_
-
-#include "ppr/io/DataOutputStream.hpp"
-#include "ppr/util/ifr/array"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace io
-    {
-      using namespace ifr;
-
-/*
- * ByteArrayOutputStream writes primitive C++ data types to a
- * in memory byte array.
- */
-class ByteArrayOutputStream : public DataOutputStream
-{
-private:
-    array<char> body ;
-    int         bodySize,
-                bodyLength,
-                offset ;
-
-    const static int INITIAL_SIZE = 256 ;
-    const static int EXPAND_SIZE  = 128 ;
-
-public:
-    ByteArrayOutputStream() ;
-    ByteArrayOutputStream(array<char> buffer) ;
-    virtual ~ByteArrayOutputStream() ;
-
-    virtual array<char> toArray() ;
-
-    virtual void close() throw(IOException) ;
-    virtual void flush() throw(IOException) ;
-    virtual int write(const char* buffer, int index, int length) throw(IOException) ;
-
-protected:
-    virtual void expandBody() ;
-} ;
-
-/* namespace */
-    }
-  }
-}
-
-#endif /*Ppr_ByteArrayOutputStream_hpp_*/
+/* 
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef Ppr_ByteArrayOutputStream_hpp_
+#define Ppr_ByteArrayOutputStream_hpp_
+
+#include "ppr/io/DataOutputStream.hpp"
+#include "ppr/util/ifr/array"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace io
+    {
+      using namespace ifr;
+
+/*
+ * ByteArrayOutputStream writes primitive C++ data types to a
+ * in memory byte array.
+ */
+class ByteArrayOutputStream : public DataOutputStream
+{
+private:
+    array<char> body ;
+    int         bodySize,
+                bodyLength,
+                offset ;
+
+    const static int INITIAL_SIZE = 256 ;
+    const static int EXPAND_SIZE  = 128 ;
+
+public:
+    ByteArrayOutputStream() ;
+    ByteArrayOutputStream(array<char> buffer) ;
+    virtual ~ByteArrayOutputStream() ;
+
+    virtual array<char> toArray() ;
+
+    virtual void close() throw(IOException) ;
+    virtual void flush() throw(IOException) ;
+    virtual int write(const char* buffer, int index, int length) throw(IOException) ;
+
+protected:
+    virtual void expandBody() ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*Ppr_ByteArrayOutputStream_hpp_*/

Propchange: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/ByteArrayOutputStream.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/DataInputStream.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/DataInputStream.cpp?rev=426431&r1=426430&r2=426431&view=diff
==============================================================================
--- incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/DataInputStream.cpp (original)
+++ incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/DataInputStream.cpp Fri Jul 28 01:22:48 2006
@@ -1,146 +1,146 @@
-/* 
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "ppr/io/DataInputStream.hpp"
-
-using namespace apache::ppr::io;
-
-/*
- *
- */
-DataInputStream::DataInputStream()
-{
-    // no-op
-}
-
-/*
- *
- */
-DataInputStream::~DataInputStream()
-{
-    // no-op
-}
-
-/*
- *
- */
-char DataInputStream::readByte() throw(IOException)
-{
-    char value ;
-
-    // Read a single byte
-    read(&value, 0, sizeof(char)) ;
-    return value ;
-}
-
-/*
- *
- */
-bool DataInputStream::readBoolean() throw(IOException)
-{
-    // Read a boolean
-    return ( readByte() ) ? true : false ;
-}
-
-/*
- *
- */
-double DataInputStream::readDouble() throw(IOException)
-{
-    double value ;
-
-    // Read a double and convert from big endian to little endian if necessary
-    read((char*)&value, 0, sizeof(double) ) ;
-    return ntohd(value) ;
-}
-
-/*
- *
- */
-float DataInputStream::readFloat() throw(IOException)
-{
-    float value ;
-
-    // Read a float and convert from big endian to little endian if necessary
-    read((char*)&value, 0, sizeof(float)) ;
-    return ntohf(value) ;
-}
-
-/*
- *
- */
-short DataInputStream::readShort() throw(IOException)
-{
-    short value ;
-
-    // Read a short and convert from big endian to little endian if necessary
-    read((char*)&value, 0, sizeof(short)) ;
-    return ntohs(value) ;
-}
-
-/*
- *
- */
-int DataInputStream::readInt() throw(IOException)
-{
-    int value ;
-
-    // Read an int and convert from big endian to little endian if necessary
-    read((char*)&value, 0, sizeof(int)) ;
-    return ntohi(value) ;
-}
-
-/*
- *
- */
-long long DataInputStream::readLong() throw(IOException)
-{
-    long long value ;
-
-    // Read a long long and convert from big endian to little endian if necessary
-    read((char*)&value, 0, sizeof(long long)) ;
-    return ntohll(value) ;
-}
-
-/*
- *
- */
-p<string> DataInputStream::readString() throw(IOException)
-{
-    p<string> value ;
-    char*     buffer ;
-    short     length ;
-
-    // Read length of string
-    length = readShort() ;
-    if (length < 0) {
-        throw IOException ("Negative length of string");
-    } else if (length > 0) {
-        buffer = new char[length+1] ;
-
-        // Read string bytes
-        read(buffer, 0, length) ;
-        *(buffer+length) = '\0' ;
-
-        // Create string class
-        value = new string() ;
-        value->assign(buffer) ;
-
-        return value ;
-    } else {
-        return new string ("");
-    }
-}
+/* 
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "ppr/io/DataInputStream.hpp"
+
+using namespace apache::ppr::io;
+
+/*
+ *
+ */
+DataInputStream::DataInputStream()
+{
+    // no-op
+}
+
+/*
+ *
+ */
+DataInputStream::~DataInputStream()
+{
+    // no-op
+}
+
+/*
+ *
+ */
+char DataInputStream::readByte() throw(IOException)
+{
+    char value ;
+
+    // Read a single byte
+    read(&value, 0, sizeof(char)) ;
+    return value ;
+}
+
+/*
+ *
+ */
+bool DataInputStream::readBoolean() throw(IOException)
+{
+    // Read a boolean
+    return ( readByte() ) ? true : false ;
+}
+
+/*
+ *
+ */
+double DataInputStream::readDouble() throw(IOException)
+{
+    double value ;
+
+    // Read a double and convert from big endian to little endian if necessary
+    read((char*)&value, 0, sizeof(double) ) ;
+    return ntohd(value) ;
+}
+
+/*
+ *
+ */
+float DataInputStream::readFloat() throw(IOException)
+{
+    float value ;
+
+    // Read a float and convert from big endian to little endian if necessary
+    read((char*)&value, 0, sizeof(float)) ;
+    return ntohf(value) ;
+}
+
+/*
+ *
+ */
+short DataInputStream::readShort() throw(IOException)
+{
+    short value ;
+
+    // Read a short and convert from big endian to little endian if necessary
+    read((char*)&value, 0, sizeof(short)) ;
+    return ntohs(value) ;
+}
+
+/*
+ *
+ */
+int DataInputStream::readInt() throw(IOException)
+{
+    int value ;
+
+    // Read an int and convert from big endian to little endian if necessary
+    read((char*)&value, 0, sizeof(int)) ;
+    return ntohi(value) ;
+}
+
+/*
+ *
+ */
+long long DataInputStream::readLong() throw(IOException)
+{
+    long long value ;
+
+    // Read a long long and convert from big endian to little endian if necessary
+    read((char*)&value, 0, sizeof(long long)) ;
+    return ntohll(value) ;
+}
+
+/*
+ *
+ */
+p<string> DataInputStream::readString() throw(IOException)
+{
+    p<string> value ;
+    char*     buffer ;
+    short     length ;
+
+    // Read length of string
+    length = readShort() ;
+    if (length < 0) {
+        throw IOException ("Negative length of string");
+    } else if (length > 0) {
+        buffer = new char[length+1] ;
+
+        // Read string bytes
+        read(buffer, 0, length) ;
+        *(buffer+length) = '\0' ;
+
+        // Create string class
+        value = new string() ;
+        value->assign(buffer) ;
+
+        return value ;
+    } else {
+        return new string ("");
+    }
+}

Propchange: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/DataInputStream.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/DataInputStream.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/DataInputStream.hpp?rev=426431&r1=426430&r2=426431&view=diff
==============================================================================
--- incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/DataInputStream.hpp (original)
+++ incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/DataInputStream.hpp Fri Jul 28 01:22:48 2006
@@ -1,67 +1,67 @@
-/* 
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef Ppr_DataInputStream_hpp_
-#define Ppr_DataInputStream_hpp_
-
-#include "ppr/io/IInputStream.hpp"
-#include "ppr/util/Endian.hpp"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace io
-    {
-      using namespace apache::ppr::util; //htonx and ntohx functions.
-      using namespace ifr;
-
-/*
- * The DataInputStream class reads primitive C++ data types from an
- * underlying input stream in a Java compatible way. Strings are
- * read as raw bytes, no character decoding is performed.
- *
- * All numeric data types are assumed to be available in big
- * endian (network byte order) and are converted automatically
- * to little endian if needed by the platform.
- *
- * Should any error occur an IOException will be thrown.
- */
-class DataInputStream : public IInputStream
-{
-public:
-    DataInputStream() ;
-    virtual ~DataInputStream() ;
-
-    virtual void close() throw(IOException) = 0 ;
-    virtual int read(char* buffer, int index, int count) throw(IOException) = 0 ;
-    virtual char readByte() throw(IOException) ;
-    virtual bool readBoolean() throw(IOException) ;
-    virtual double readDouble() throw(IOException) ;
-    virtual float readFloat() throw(IOException) ;
-    virtual short readShort() throw(IOException) ;
-    virtual int readInt() throw(IOException) ;
-    virtual long long readLong() throw(IOException) ;
-    virtual p<string> readString() throw(IOException) ;
-} ;
-
-/* namespace */
-    }
-  }
-}
-
-#endif /*Ppr_DataInputStream_hpp_*/
+/* 
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef Ppr_DataInputStream_hpp_
+#define Ppr_DataInputStream_hpp_
+
+#include "ppr/io/IInputStream.hpp"
+#include "ppr/util/Endian.hpp"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace io
+    {
+      using namespace apache::ppr::util; //htonx and ntohx functions.
+      using namespace ifr;
+
+/*
+ * The DataInputStream class reads primitive C++ data types from an
+ * underlying input stream in a Java compatible way. Strings are
+ * read as raw bytes, no character decoding is performed.
+ *
+ * All numeric data types are assumed to be available in big
+ * endian (network byte order) and are converted automatically
+ * to little endian if needed by the platform.
+ *
+ * Should any error occur an IOException will be thrown.
+ */
+class DataInputStream : public IInputStream
+{
+public:
+    DataInputStream() ;
+    virtual ~DataInputStream() ;
+
+    virtual void close() throw(IOException) = 0 ;
+    virtual int read(char* buffer, int index, int count) throw(IOException) = 0 ;
+    virtual char readByte() throw(IOException) ;
+    virtual bool readBoolean() throw(IOException) ;
+    virtual double readDouble() throw(IOException) ;
+    virtual float readFloat() throw(IOException) ;
+    virtual short readShort() throw(IOException) ;
+    virtual int readInt() throw(IOException) ;
+    virtual long long readLong() throw(IOException) ;
+    virtual p<string> readString() throw(IOException) ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*Ppr_DataInputStream_hpp_*/

Propchange: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/DataInputStream.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/DataOutputStream.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/DataOutputStream.cpp?rev=426431&r1=426430&r2=426431&view=diff
==============================================================================
--- incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/DataOutputStream.cpp (original)
+++ incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/DataOutputStream.cpp Fri Jul 28 01:22:48 2006
@@ -1,82 +1,82 @@
-/* 
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "ppr/io/DataOutputStream.hpp"
-
-using namespace apache::ppr::io;
-
-void DataOutputStream::writeByte(char value) throw(IOException)
-{
-    // Write a single byte
-    write((char*)&value, 0, sizeof(char)) ;
-}
-
-void DataOutputStream::writeBoolean(bool value) throw(IOException)
-{
-    // Write a boolean
-    ( value ) ? writeByte(0x01) : writeByte(0x00) ;
-}
-
-void DataOutputStream::writeDouble(double v) throw(IOException)
-{
-    // Write a double, convert from little endian to big endian if necessary
-    double value = htond(v) ;
-    write((char*)&value, 0, sizeof(double)) ;
-}
-
-void DataOutputStream::writeFloat(float v) throw(IOException)
-{
-    // Write a float, convert from little endian to big endian if necessary
-    float value = htonf(v) ;
-    write((char*)&value, 0, sizeof(float)) ;
-}
-
-void DataOutputStream::writeShort(short v) throw(IOException)
-{
-    // Write a short, convert from little endian to big endian if necessary
-    short value = htons(v) ;
-    write((char*)&value, 0, sizeof(short)) ;
-}
-
-void DataOutputStream::writeInt(int v) throw(IOException)
-{
-    // Write an int, convert from little endian to big endian if necessary
-    int value = htoni(v) ;
-    write((char*)&value, 0, sizeof(int)) ;
-}
-
-void DataOutputStream::writeLong(long long v) throw(IOException)
-{
-    // Write a long long, convert from little endian to big endian if necessary
-    long long value = htonll(v) ;
-    write((char*)&value, 0, sizeof(long long)) ;
-}
-
-void DataOutputStream::writeString(p<string> value) throw(IOException)
-{
-    // Assert argument
-    if( value == NULL )
-        return ;
-    if( value->length() > USHRT_MAX )
-        throw IOException("String length exceeds maximum length") ;
-
-    // Write length of string
-    short length = (short)value->length() ;
-    writeShort( length ) ;
-
-    // Write string contents
-    write((char*)value->c_str(), 0, length) ;
-}
+/* 
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "ppr/io/DataOutputStream.hpp"
+
+using namespace apache::ppr::io;
+
+void DataOutputStream::writeByte(char value) throw(IOException)
+{
+    // Write a single byte
+    write((char*)&value, 0, sizeof(char)) ;
+}
+
+void DataOutputStream::writeBoolean(bool value) throw(IOException)
+{
+    // Write a boolean
+    ( value ) ? writeByte(0x01) : writeByte(0x00) ;
+}
+
+void DataOutputStream::writeDouble(double v) throw(IOException)
+{
+    // Write a double, convert from little endian to big endian if necessary
+    double value = htond(v) ;
+    write((char*)&value, 0, sizeof(double)) ;
+}
+
+void DataOutputStream::writeFloat(float v) throw(IOException)
+{
+    // Write a float, convert from little endian to big endian if necessary
+    float value = htonf(v) ;
+    write((char*)&value, 0, sizeof(float)) ;
+}
+
+void DataOutputStream::writeShort(short v) throw(IOException)
+{
+    // Write a short, convert from little endian to big endian if necessary
+    short value = htons(v) ;
+    write((char*)&value, 0, sizeof(short)) ;
+}
+
+void DataOutputStream::writeInt(int v) throw(IOException)
+{
+    // Write an int, convert from little endian to big endian if necessary
+    int value = htoni(v) ;
+    write((char*)&value, 0, sizeof(int)) ;
+}
+
+void DataOutputStream::writeLong(long long v) throw(IOException)
+{
+    // Write a long long, convert from little endian to big endian if necessary
+    long long value = htonll(v) ;
+    write((char*)&value, 0, sizeof(long long)) ;
+}
+
+void DataOutputStream::writeString(p<string> value) throw(IOException)
+{
+    // Assert argument
+    if( value == NULL )
+        return ;
+    if( value->length() > USHRT_MAX )
+        throw IOException("String length exceeds maximum length") ;
+
+    // Write length of string
+    short length = (short)value->length() ;
+    writeShort( length ) ;
+
+    // Write string contents
+    write((char*)value->c_str(), 0, length) ;
+}

Propchange: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/DataOutputStream.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/DataOutputStream.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/DataOutputStream.hpp?rev=426431&r1=426430&r2=426431&view=diff
==============================================================================
--- incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/DataOutputStream.hpp (original)
+++ incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/DataOutputStream.hpp Fri Jul 28 01:22:48 2006
@@ -1,65 +1,65 @@
-/* 
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef Ppr_DataOutputStream_hpp_
-#define Ppr_DataOutputStream_hpp_
-
-#include "ppr/io/IOutputStream.hpp"
-#include "ppr/util/Endian.hpp"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace io
-    {
-      using namespace apache::ppr::util; // htonx and ntohx functions.
-      using namespace ifr;
-
-/*
- * The DataOutputStream class writes primitive C++ data types to an
- * underlying output stream in a Java compatible way. Strings
- * are written as raw bytes, no character encoding is performed.
- *
- * All numeric data types are written in big endian (network byte
- * order) and if the platform is little endian they are converted
- * automatically.
- *
- * Should any error occur an IOException will be thrown.
- */
-class DataOutputStream : public IOutputStream
-{
-public:
-    virtual void close() throw(IOException) = 0 ;
-    virtual void flush() throw(IOException) = 0 ;
-    virtual int write(const char* buffer, int index, int count) throw(IOException) = 0 ;
-    virtual void writeByte(char v) throw(IOException) ;
-    virtual void writeBoolean(bool v) throw(IOException) ;
-    virtual void writeDouble(double v) throw(IOException) ;
-    virtual void writeFloat(float v) throw(IOException) ;
-    virtual void writeShort(short v) throw(IOException) ;
-    virtual void writeInt(int v) throw(IOException) ;
-    virtual void writeLong(long long v) throw(IOException) ;
-    virtual void writeString(p<string> v) throw(IOException) ;
-} ;
-
-/* namespace */
-    }
-  }
-}
-
-#endif /*Ppr_DataOutputStream_hpp_*/
+/* 
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef Ppr_DataOutputStream_hpp_
+#define Ppr_DataOutputStream_hpp_
+
+#include "ppr/io/IOutputStream.hpp"
+#include "ppr/util/Endian.hpp"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace io
+    {
+      using namespace apache::ppr::util; // htonx and ntohx functions.
+      using namespace ifr;
+
+/*
+ * The DataOutputStream class writes primitive C++ data types to an
+ * underlying output stream in a Java compatible way. Strings
+ * are written as raw bytes, no character encoding is performed.
+ *
+ * All numeric data types are written in big endian (network byte
+ * order) and if the platform is little endian they are converted
+ * automatically.
+ *
+ * Should any error occur an IOException will be thrown.
+ */
+class DataOutputStream : public IOutputStream
+{
+public:
+    virtual void close() throw(IOException) = 0 ;
+    virtual void flush() throw(IOException) = 0 ;
+    virtual int write(const char* buffer, int index, int count) throw(IOException) = 0 ;
+    virtual void writeByte(char v) throw(IOException) ;
+    virtual void writeBoolean(bool v) throw(IOException) ;
+    virtual void writeDouble(double v) throw(IOException) ;
+    virtual void writeFloat(float v) throw(IOException) ;
+    virtual void writeShort(short v) throw(IOException) ;
+    virtual void writeInt(int v) throw(IOException) ;
+    virtual void writeLong(long long v) throw(IOException) ;
+    virtual void writeString(p<string> v) throw(IOException) ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*Ppr_DataOutputStream_hpp_*/

Propchange: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/DataOutputStream.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/EOFException.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/EOFException.hpp?rev=426431&r1=426430&r2=426431&view=diff
==============================================================================
--- incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/EOFException.hpp (original)
+++ incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/EOFException.hpp Fri Jul 28 01:22:48 2006
@@ -1,53 +1,53 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef Ppr_EOFException_hpp_
-#define Ppr_EOFException_hpp_
-
-#include "ppr/io/IOException.hpp"
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace io
-    {
-      using namespace apache::ppr;
-      using namespace std ;
-
-/*
- * Signals that end-of-file has been reached.
- */
-class EOFException : public IOException
-{
-public:
-    EOFException() : IOException()
-    { /* no-op */ } ;
-    EOFException(const char* msg, ...)
-    {
-        va_list vargs ;
-
-        va_start(vargs, msg) ;
-        TraceException::buildMessage(msg, vargs) ;
-    }
-} ;
-
-/* namespace */
-    }
-  }
-}
-
-#endif /*Ppr_EOFException_hpp_*/
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef Ppr_EOFException_hpp_
+#define Ppr_EOFException_hpp_
+
+#include "ppr/io/IOException.hpp"
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace io
+    {
+      using namespace apache::ppr;
+      using namespace std ;
+
+/*
+ * Signals that end-of-file has been reached.
+ */
+class EOFException : public IOException
+{
+public:
+    EOFException() : IOException()
+    { /* no-op */ } ;
+    EOFException(const char* msg, ...)
+    {
+        va_list vargs ;
+
+        va_start(vargs, msg) ;
+        TraceException::buildMessage(msg, vargs) ;
+    }
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*Ppr_EOFException_hpp_*/

Propchange: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/EOFException.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/IInputStream.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/IInputStream.hpp?rev=426431&r1=426430&r2=426431&view=diff
==============================================================================
--- incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/IInputStream.hpp (original)
+++ incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/IInputStream.hpp Fri Jul 28 01:22:48 2006
@@ -1,63 +1,63 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef Ppr_IInputStream_hpp_
-#define Ppr_IInputStream_hpp_
-
-// Turn off warning message for ignored exception specification
-#ifdef _MSC_VER
-#pragma warning( disable : 4290 )
-#endif
-
-#include <string>
-#include "ppr/io/IOException.hpp"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace io
-    {
-      using namespace std;
-      using namespace ifr;
-
-/*
- * The IInputStream interface provides for reading bytes from a binary stream
- * and reconstructing from them data in any of the C++ primitive types.
- * Strings are read as raw bytes, no character decoding is performed. If
- * any byte cannot be read for any reason, an IOException is thrown.
- */
-struct IInputStream : Interface
-{
-    virtual void close() throw(IOException) = 0 ;
-    virtual int read(char* buffer, int index, int count) throw(IOException) = 0 ;
-    virtual char readByte() throw(IOException) = 0 ;
-    virtual bool readBoolean() throw(IOException) = 0 ;
-    virtual double readDouble() throw(IOException) = 0 ;
-    virtual float readFloat() throw(IOException) = 0 ;
-    virtual short readShort() throw(IOException) = 0 ;
-    virtual int readInt() throw(IOException) = 0 ;
-    virtual long long readLong() throw(IOException) = 0 ;
-    virtual p<string> readString() throw(IOException) = 0 ;
-} ;
-
-/* namespace */
-    }
-  }
-}
-
-#endif /*Ppr_IInputStream_hpp_*/
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef Ppr_IInputStream_hpp_
+#define Ppr_IInputStream_hpp_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <string>
+#include "ppr/io/IOException.hpp"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace io
+    {
+      using namespace std;
+      using namespace ifr;
+
+/*
+ * The IInputStream interface provides for reading bytes from a binary stream
+ * and reconstructing from them data in any of the C++ primitive types.
+ * Strings are read as raw bytes, no character decoding is performed. If
+ * any byte cannot be read for any reason, an IOException is thrown.
+ */
+struct IInputStream : Interface
+{
+    virtual void close() throw(IOException) = 0 ;
+    virtual int read(char* buffer, int index, int count) throw(IOException) = 0 ;
+    virtual char readByte() throw(IOException) = 0 ;
+    virtual bool readBoolean() throw(IOException) = 0 ;
+    virtual double readDouble() throw(IOException) = 0 ;
+    virtual float readFloat() throw(IOException) = 0 ;
+    virtual short readShort() throw(IOException) = 0 ;
+    virtual int readInt() throw(IOException) = 0 ;
+    virtual long long readLong() throw(IOException) = 0 ;
+    virtual p<string> readString() throw(IOException) = 0 ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*Ppr_IInputStream_hpp_*/

Propchange: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/IInputStream.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/IOException.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/IOException.hpp?rev=426431&r1=426430&r2=426431&view=diff
==============================================================================
--- incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/IOException.hpp (original)
+++ incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/IOException.hpp Fri Jul 28 01:22:48 2006
@@ -1,53 +1,53 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef Ppr_IOException_hpp_
-#define Ppr_IOException_hpp_
-
-#include "ppr/TraceException.hpp"
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace io
-    {
-      using namespace apache::ppr;
-      using namespace std ;
-
-/*
- * Signals that an I/O exception of some sort has occurred.
- */
-class IOException : public TraceException
-{
-public:
-    IOException() : TraceException()
-    { /* no-op */ } ;
-    IOException(const char* msg, ...)
-    {
-        va_list vargs ;
-
-        va_start(vargs, msg) ;
-        TraceException::buildMessage(msg, vargs) ;
-    }
-} ;
-
-/* namespace */
-    }
-  }
-}
-
-#endif /*Ppr_IOException_hpp_*/
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef Ppr_IOException_hpp_
+#define Ppr_IOException_hpp_
+
+#include "ppr/TraceException.hpp"
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace io
+    {
+      using namespace apache::ppr;
+      using namespace std ;
+
+/*
+ * Signals that an I/O exception of some sort has occurred.
+ */
+class IOException : public TraceException
+{
+public:
+    IOException() : TraceException()
+    { /* no-op */ } ;
+    IOException(const char* msg, ...)
+    {
+        va_list vargs ;
+
+        va_start(vargs, msg) ;
+        TraceException::buildMessage(msg, vargs) ;
+    }
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*Ppr_IOException_hpp_*/

Propchange: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/IOException.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/IOutputStream.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/IOutputStream.hpp?rev=426431&r1=426430&r2=426431&view=diff
==============================================================================
--- incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/IOutputStream.hpp (original)
+++ incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/IOutputStream.hpp Fri Jul 28 01:22:48 2006
@@ -1,65 +1,65 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef Ppr_IOutputStream_hpp_
-#define Ppr_IOutputStream_hpp_
-
-// Turn off warning message for ignored exception specification
-#ifdef _MSC_VER
-#pragma warning( disable : 4290 )
-#endif
-
-#include <string>
-#include "ppr/io/IOException.hpp"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace io
-    {
-      using namespace std;
-      using namespace ifr;
-
-/*
- * The IOutputStream interface provides for converting data from any of the
- * C++ primitive types to a series of bytes and writing these bytes to
- * a binary stream. Strings are written as raw bytes, no character
- * encoding is performed. If a byte cannot be written for any reason,
- * an IOException is thrown. 
- */
-struct IOutputStream : Interface
-{
-    virtual void close() throw(IOException) = 0 ;
-    virtual void flush() throw(IOException) = 0 ;
-    virtual int write(const char* buffer, int index, int count) throw(IOException) = 0 ;
-    virtual void writeByte(char v) throw(IOException) = 0 ;
-    virtual void writeBoolean(bool v) throw(IOException) = 0 ;
-    virtual void writeDouble(double v) throw(IOException) = 0 ;
-    virtual void writeFloat(float v) throw(IOException) = 0 ;
-    virtual void writeShort(short v) throw(IOException) = 0 ;
-    virtual void writeInt(int v) throw(IOException) = 0 ;
-    virtual void writeLong(long long v) throw(IOException) = 0 ;
-    virtual void writeString(p<string> v) throw(IOException) = 0 ;
-} ;
-
-/* namespace */
-    }
-  }
-}
-
-#endif /*Ppr_IOutputStream_hpp_*/
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef Ppr_IOutputStream_hpp_
+#define Ppr_IOutputStream_hpp_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <string>
+#include "ppr/io/IOException.hpp"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace io
+    {
+      using namespace std;
+      using namespace ifr;
+
+/*
+ * The IOutputStream interface provides for converting data from any of the
+ * C++ primitive types to a series of bytes and writing these bytes to
+ * a binary stream. Strings are written as raw bytes, no character
+ * encoding is performed. If a byte cannot be written for any reason,
+ * an IOException is thrown. 
+ */
+struct IOutputStream : Interface
+{
+    virtual void close() throw(IOException) = 0 ;
+    virtual void flush() throw(IOException) = 0 ;
+    virtual int write(const char* buffer, int index, int count) throw(IOException) = 0 ;
+    virtual void writeByte(char v) throw(IOException) = 0 ;
+    virtual void writeBoolean(bool v) throw(IOException) = 0 ;
+    virtual void writeDouble(double v) throw(IOException) = 0 ;
+    virtual void writeFloat(float v) throw(IOException) = 0 ;
+    virtual void writeShort(short v) throw(IOException) = 0 ;
+    virtual void writeInt(int v) throw(IOException) = 0 ;
+    virtual void writeLong(long long v) throw(IOException) = 0 ;
+    virtual void writeString(p<string> v) throw(IOException) = 0 ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*Ppr_IOutputStream_hpp_*/

Propchange: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/IOutputStream.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/SocketInputStream.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/SocketInputStream.cpp?rev=426431&r1=426430&r2=426431&view=diff
==============================================================================
--- incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/SocketInputStream.cpp (original)
+++ incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/SocketInputStream.cpp Fri Jul 28 01:22:48 2006
@@ -1,56 +1,56 @@
-/* 
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "ppr/io/SocketInputStream.hpp"
-
-using namespace apache::ppr::io;
-
-void SocketInputStream::close() throw(IOException)
-{
-    // no-op
-}
-
-/*
- *
- */
-int SocketInputStream::read(char* buf, int index, int size) throw(IOException)
-{
-    char* buffer = buf + index ;
-    int   length, remaining = size ;
-
-    // Loop until requested number of bytes are read
-    while( remaining > 0 )
-    {
-        // Try to read remaining bytes
-        length = remaining ;
-
-        try
-        {
-            // Read some bytes from socket
-            length = socket->receive(buffer, length) ;
-        }
-        catch( SocketException se )
-        {
-            // Exit on any error
-            throw IOException("Failed to read from socket; error message = %s, at %s line %d", se.what(), __FILE__, __LINE__) ;
-        }
-
-        // Adjust buffer pointer and remaining number of bytes
-        buffer    += length ;
-        remaining -= length ;
-	}
-	return size ;
-}
+/* 
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "ppr/io/SocketInputStream.hpp"
+
+using namespace apache::ppr::io;
+
+void SocketInputStream::close() throw(IOException)
+{
+    // no-op
+}
+
+/*
+ *
+ */
+int SocketInputStream::read(char* buf, int index, int size) throw(IOException)
+{
+    char* buffer = buf + index ;
+    int   length, remaining = size ;
+
+    // Loop until requested number of bytes are read
+    while( remaining > 0 )
+    {
+        // Try to read remaining bytes
+        length = remaining ;
+
+        try
+        {
+            // Read some bytes from socket
+            length = socket->receive(buffer, length) ;
+        }
+        catch( SocketException se )
+        {
+            // Exit on any error
+            throw IOException("Failed to read from socket; error message = %s, at %s line %d", se.what(), __FILE__, __LINE__) ;
+        }
+
+        // Adjust buffer pointer and remaining number of bytes
+        buffer    += length ;
+        remaining -= length ;
+	}
+	return size ;
+}

Propchange: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/SocketInputStream.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/SocketInputStream.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/SocketInputStream.hpp?rev=426431&r1=426430&r2=426431&view=diff
==============================================================================
--- incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/SocketInputStream.hpp (original)
+++ incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/SocketInputStream.hpp Fri Jul 28 01:22:48 2006
@@ -1,56 +1,56 @@
-/* 
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef Ppr_SocketInputStream_hpp_
-#define Ppr_SocketInputStream_hpp_
-
-#include "ppr/io/DataInputStream.hpp"
-#include "ppr/net/ISocket.hpp"
-#include "ppr/net/SocketException.hpp"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace io
-    {
-      using namespace ifr ;
-      using namespace apache::ppr::net ;
-      using namespace apache::ppr::util ;
-
-/*
- * SocketInputStream reads primitive C++ data types from a
- * socket stream. It currently uses PPR sockets for
- * platform independency.
- */
-class SocketInputStream : public DataInputStream
-{
-private:
-    p<ISocket> socket ;
-public:
-    SocketInputStream(p<ISocket> socket) : socket (socket) {}
-public:
-    virtual void close() throw(IOException) ;
-    virtual int read(char* buffer, int index, int size) throw(IOException) ;
-} ;
-
-/* namespace */
-    }
-  }
-}
-
-#endif /*Ppr_SocketInputStream_hpp_*/
+/* 
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef Ppr_SocketInputStream_hpp_
+#define Ppr_SocketInputStream_hpp_
+
+#include "ppr/io/DataInputStream.hpp"
+#include "ppr/net/ISocket.hpp"
+#include "ppr/net/SocketException.hpp"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace io
+    {
+      using namespace ifr ;
+      using namespace apache::ppr::net ;
+      using namespace apache::ppr::util ;
+
+/*
+ * SocketInputStream reads primitive C++ data types from a
+ * socket stream. It currently uses PPR sockets for
+ * platform independency.
+ */
+class SocketInputStream : public DataInputStream
+{
+private:
+    p<ISocket> socket ;
+public:
+    SocketInputStream(p<ISocket> socket) : socket (socket) {}
+public:
+    virtual void close() throw(IOException) ;
+    virtual int read(char* buffer, int index, int size) throw(IOException) ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*Ppr_SocketInputStream_hpp_*/

Propchange: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/SocketInputStream.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/SocketOutputStream.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/SocketOutputStream.cpp?rev=426431&r1=426430&r2=426431&view=diff
==============================================================================
--- incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/SocketOutputStream.cpp (original)
+++ incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/SocketOutputStream.cpp Fri Jul 28 01:22:48 2006
@@ -1,77 +1,77 @@
-/* 
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "ppr/io/SocketOutputStream.hpp"
-
-using namespace apache::ppr::io;
-
-/*
- *
- */
-SocketOutputStream::SocketOutputStream(p<ISocket> socket)
-{
-    this->socket = socket ;
-}
-
-/*
- *
- */
-SocketOutputStream::~SocketOutputStream()
-{
-    // no-op
-}
-
-void SocketOutputStream::close() throw(IOException)
-{
-    // no-op
-}
-
-void SocketOutputStream::flush() throw(IOException)
-{
-    // no-op
-}
-
-/*
- *
- */
-int SocketOutputStream::write(const char* buf, int index, int size) throw(IOException)
-{
-    const char*  buffer = buf + index ;
-    int          length, remaining = size ;
-
-    // Loop until requested number of bytes are read
-    while( remaining > 0 )
-    {
-        // Try to write remaining bytes
-        length = remaining ;
-
-        try
-        {
-            // Write some bytes to socket
-            length = socket->send(buffer, length) ;
-        }
-        catch( SocketException se )
-        {
-            // Exit on any error
-            throw IOException("Failed to write to socket; error message = %s, at %s line %d", se.what(), __FILE__, __LINE__) ;
-        }
-
-        // Adjust buffer pointer and remaining number of bytes
-        buffer    += length ;
-        remaining -= length ;
-	}
-	return size ;
-}
+/* 
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "ppr/io/SocketOutputStream.hpp"
+
+using namespace apache::ppr::io;
+
+/*
+ *
+ */
+SocketOutputStream::SocketOutputStream(p<ISocket> socket)
+{
+    this->socket = socket ;
+}
+
+/*
+ *
+ */
+SocketOutputStream::~SocketOutputStream()
+{
+    // no-op
+}
+
+void SocketOutputStream::close() throw(IOException)
+{
+    // no-op
+}
+
+void SocketOutputStream::flush() throw(IOException)
+{
+    // no-op
+}
+
+/*
+ *
+ */
+int SocketOutputStream::write(const char* buf, int index, int size) throw(IOException)
+{
+    const char*  buffer = buf + index ;
+    int          length, remaining = size ;
+
+    // Loop until requested number of bytes are read
+    while( remaining > 0 )
+    {
+        // Try to write remaining bytes
+        length = remaining ;
+
+        try
+        {
+            // Write some bytes to socket
+            length = socket->send(buffer, length) ;
+        }
+        catch( SocketException se )
+        {
+            // Exit on any error
+            throw IOException("Failed to write to socket; error message = %s, at %s line %d", se.what(), __FILE__, __LINE__) ;
+        }
+
+        // Adjust buffer pointer and remaining number of bytes
+        buffer    += length ;
+        remaining -= length ;
+	}
+	return size ;
+}

Propchange: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/SocketOutputStream.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/SocketOutputStream.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/SocketOutputStream.hpp?rev=426431&r1=426430&r2=426431&view=diff
==============================================================================
--- incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/SocketOutputStream.hpp (original)
+++ incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/SocketOutputStream.hpp Fri Jul 28 01:22:48 2006
@@ -1,59 +1,59 @@
-/* 
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef Ppr_SocketOutputStream_hpp_
-#define Ppr_SocketOutputStream_hpp_
-
-#include "ppr/io/DataOutputStream.hpp"
-#include "ppr/net/ISocket.hpp"
-#include "ppr/net/SocketException.hpp"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace io
-    {
-      using namespace ifr ;
-      using namespace apache::ppr::net ;
-      using namespace apache::ppr::util ;
-
-/*
- * SocketOutputStream writes primitive C++ data types to a
- * socket stream. It currently uses PPR sockets for
- * platform independency.
- */
-class SocketOutputStream : public DataOutputStream
-{
-private:
-    p<ISocket> socket ;
-
-public:
-    SocketOutputStream(p<ISocket> socket) ;
-    virtual ~SocketOutputStream() ;
-
-    virtual void close() throw(IOException) ;
-    virtual void flush() throw(IOException) ;
-    virtual int write(const char* buffer, int index, int size) throw(IOException) ;
-} ;
-
-/* namespace */
-    }
-  }
-}
-
-#endif /*Ppr_SocketOutputStream_hpp_*/
+/* 
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef Ppr_SocketOutputStream_hpp_
+#define Ppr_SocketOutputStream_hpp_
+
+#include "ppr/io/DataOutputStream.hpp"
+#include "ppr/net/ISocket.hpp"
+#include "ppr/net/SocketException.hpp"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace io
+    {
+      using namespace ifr ;
+      using namespace apache::ppr::net ;
+      using namespace apache::ppr::util ;
+
+/*
+ * SocketOutputStream writes primitive C++ data types to a
+ * socket stream. It currently uses PPR sockets for
+ * platform independency.
+ */
+class SocketOutputStream : public DataOutputStream
+{
+private:
+    p<ISocket> socket ;
+
+public:
+    SocketOutputStream(p<ISocket> socket) ;
+    virtual ~SocketOutputStream() ;
+
+    virtual void close() throw(IOException) ;
+    virtual void flush() throw(IOException) ;
+    virtual int write(const char* buffer, int index, int size) throw(IOException) ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*Ppr_SocketOutputStream_hpp_*/

Propchange: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/io/SocketOutputStream.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/net/IServerSocket.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/net/IServerSocket.hpp?rev=426431&r1=426430&r2=426431&view=diff
==============================================================================
--- incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/net/IServerSocket.hpp (original)
+++ incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/net/IServerSocket.hpp Fri Jul 28 01:22:48 2006
@@ -1,69 +1,69 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef Ppr_IServerSocket_hpp_
-#define Ppr_IServerSocket_hpp_
-
-#include "ppr/net/ISocket.hpp"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace net
-    {
-      using namespace ifr;
-
-/*
- *
- */
-struct IServerSocket : Interface
-{
-    /** Bind and listen to given IP/dns and port.
-        @param host IP address or host name.
-        @param port TCP port between 1..655535
-    */
-    virtual void bind(const char* host, int port) throw (SocketException) = 0 ;
-
-    /** Bind and listen to given IP/dns and port.
-        @param host IP address or host name.
-        @param port TCP port between 1..655535
-        @param backlog Size of listen backlog.
-    */
-    virtual void bind(const char* host, int port, int backlog) throw (SocketException) = 0 ;
-
-    /** Blocks until a client connects to the bound socket.
-        @return new socket. Never returns NULL.
-    */
-    virtual p<ISocket> accept() throw (SocketException) = 0 ;
-
-    /** Closes the server socket.
-    */
-    virtual void close() = 0 ;
-
-    /** @return true of the server socket is bound.
-    */ 
-    virtual bool isBound() const = 0 ;
-};
-
-/* namespace */
-    }
-  }
-}
-
-#endif /*Ppr_IServerSocket_hpp_*/
-
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef Ppr_IServerSocket_hpp_
+#define Ppr_IServerSocket_hpp_
+
+#include "ppr/net/ISocket.hpp"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace net
+    {
+      using namespace ifr;
+
+/*
+ *
+ */
+struct IServerSocket : Interface
+{
+    /** Bind and listen to given IP/dns and port.
+        @param host IP address or host name.
+        @param port TCP port between 1..655535
+    */
+    virtual void bind(const char* host, int port) throw (SocketException) = 0 ;
+
+    /** Bind and listen to given IP/dns and port.
+        @param host IP address or host name.
+        @param port TCP port between 1..655535
+        @param backlog Size of listen backlog.
+    */
+    virtual void bind(const char* host, int port, int backlog) throw (SocketException) = 0 ;
+
+    /** Blocks until a client connects to the bound socket.
+        @return new socket. Never returns NULL.
+    */
+    virtual p<ISocket> accept() throw (SocketException) = 0 ;
+
+    /** Closes the server socket.
+    */
+    virtual void close() = 0 ;
+
+    /** @return true of the server socket is bound.
+    */ 
+    virtual bool isBound() const = 0 ;
+};
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*Ppr_IServerSocket_hpp_*/
+

Propchange: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/net/IServerSocket.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/net/IServerSocketFactory.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/net/IServerSocketFactory.hpp?rev=426431&r1=426430&r2=426431&view=diff
==============================================================================
--- incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/net/IServerSocketFactory.hpp (original)
+++ incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/net/IServerSocketFactory.hpp Fri Jul 28 01:22:48 2006
@@ -1,46 +1,46 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef Ppr_IServerSocketFactory_hpp_
-#define Ppr_IServerSocketFactory_hpp_
-
-#include "ppr/net/IServerSocket.hpp"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace net
-    {
-      using namespace ifr;
-
-/*
- *
- */
-struct IServerSocketFactory : Interface
-{
-    // Creates an unbound server socket, ready to call bind() on.
-    virtual p<IServerSocket> createServerSocket() = 0 ;
-};
-
-/* namespace */
-    }
-  }
-}
-
-#endif /*Ppr_IServerSocketFactory_hpp_*/
-
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef Ppr_IServerSocketFactory_hpp_
+#define Ppr_IServerSocketFactory_hpp_
+
+#include "ppr/net/IServerSocket.hpp"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace net
+    {
+      using namespace ifr;
+
+/*
+ *
+ */
+struct IServerSocketFactory : Interface
+{
+    // Creates an unbound server socket, ready to call bind() on.
+    virtual p<IServerSocket> createServerSocket() = 0 ;
+};
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*Ppr_IServerSocketFactory_hpp_*/
+

Propchange: incubator/activemq/branches/activemq-4.0/openwire-cpp/src/main/cpp/ppr/net/IServerSocketFactory.hpp
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message