Index: /trunk/include/cf/bin.h
===================================================================
--- /trunk/include/cf/bin.h	(revision 10)
+++ /trunk/include/cf/bin.h	(revision 11)
@@ -11,4 +11,5 @@
 
 #include <vector>
+#include <string>
 #include <stdio.h>
 
@@ -38,5 +39,5 @@
 		 * @param in asciiz-byte
 		 */
-		bin(const cf::char_t * in);
+		bin(const std::string & in);
 
 		/**
@@ -116,8 +117,14 @@
 
 		/**
-		 * set 
+		 * set
 		 * @param in bin
 		 */
 		bin & operator =(const bin & in);
+
+		/**
+		 * set
+		 * @param in string
+		 */
+		bin & operator =(const std::string & in);
 
 		/**
@@ -151,4 +158,17 @@
 
 		/**
+		 * get a byte
+		 * @return a byte
+		 * @param index index
+		 */
+		cf::uint8_t operator [](const cf::size_t index) const;
+
+		/**
+		 * get as string
+		 * @return string
+		 */
+		std::string toString() const;
+
+		/**
 		 * dump binary to file-pointer
 		 * @param prefix prefix for output
Index: /trunk/include/cf/network.h
===================================================================
--- /trunk/include/cf/network.h	(revision 10)
+++ /trunk/include/cf/network.h	(revision 11)
@@ -245,5 +245,5 @@
 			 * host to network long
 			 * @return long for network
-			 * @param long for host
+			 * @param in long for host
 			 */
 			static cf::uint32_t htonl(cf::uint32_t in);
@@ -252,5 +252,5 @@
 			 * host to network short
 			 * @return short for network
-			 * @param short for host
+			 * @param in short for host
 			 */
 			static cf::uint16_t htons(cf::uint16_t in);
@@ -259,5 +259,5 @@
 			 * network to host long
 			 * @return long for host
-			 * @param long for network
+			 * @param in long for network
 			 */
 			static cf::uint32_t ntohl(cf::uint32_t in);
@@ -266,5 +266,5 @@
 			 * network to host short
 			 * @return short for host
-			 * @param short for network
+			 * @param in short for network
 			 */
 			static cf::uint16_t ntohs(cf::uint16_t in);
Index: /trunk/include/cf/task.h
===================================================================
--- /trunk/include/cf/task.h	(revision 10)
+++ /trunk/include/cf/task.h	(revision 11)
@@ -9,5 +9,5 @@
 #include "cf/exception.h"
 
-#define SYNCHRONIZED(_s)	for (cf::task::scopedLock _sl(&_s) ; _sl.synchronizer()->locked() ; _sl.synchronizer()->unlock())
+#define SYNCHRONIZED(_s)	for (cf::task::scopedLock _sl(&_s) ; _sl.locked() ; _sl.unlock())
 
 namespace cf
@@ -116,8 +116,14 @@
 
 			/**
-			 * get synchronizer
-			 * @return an instance of synchronizer
-			 */
-			ISynchronizer * synchronizer();
+			 * is locked ?
+			 * @return true; false
+			 */
+			cf::bool_t locked() const;
+
+			/**
+			 * unlock
+			 */
+			cf::void_t unlock()
+				throw (cf::exception);
 		};
 
Index: /trunk/src/bin.cpp
===================================================================
--- /trunk/src/bin.cpp	(revision 10)
+++ /trunk/src/bin.cpp	(revision 11)
@@ -15,11 +15,7 @@
 }
 
-cf::bin::bin(const cf::char_t * in)
+cf::bin::bin(const std::string & in)
+	: mBin(in.begin(), in.end())
 {
-	if (!in)
-		return;
-
-	set(reinterpret_cast<const cf::uint8_t *>(in),
-		strlen(reinterpret_cast<const char *>(in)));
 }
 
@@ -98,4 +94,10 @@
 }
 
+cf::bin & cf::bin::operator =(const std::string & in)
+{
+	mBin.assign(in.begin(), in.end());
+	return *this;
+}
+
 cf::void_t cf::bin::operator +=(const cf::bin & in)
 {
@@ -122,4 +124,12 @@
 }
 
+cf::uint8_t cf::bin::operator [](const cf::size_t index) const
+{
+	if (index > size())
+		THROW_EXCEPTION("invalid index");
+
+	return mBin[index];
+}
+
 cf::size_t cf::bin::find(const cf::uint8_t * in,
 						 const cf::size_t length) const
@@ -137,4 +147,9 @@
 
 	return -1;
+}
+
+std::string cf::bin::toString() const
+{
+	return std::string(mBin.begin(), mBin.end());
 }
 
Index: /trunk/src/task.cpp
===================================================================
--- /trunk/src/task.cpp	(revision 10)
+++ /trunk/src/task.cpp	(revision 11)
@@ -145,8 +145,8 @@
 	: mSynchronizer(inst)
 {
-	if (!synchronizer())
+	if (!mSynchronizer)
 		THROW_EXCEPTION("invalid synchronizer");
 
-	synchronizer()->lock();
+	mSynchronizer->lock();
 }
 
@@ -155,5 +155,5 @@
 	try
 	{
-		synchronizer()->unlock();
+		unlock();
 	}
 	catch (...)
@@ -162,7 +162,13 @@
 }
 
-cf::task::ISynchronizer * cf::task::scopedLock::synchronizer()
-{
-	return mSynchronizer;
+cf::bool_t cf::task::scopedLock::locked() const
+{
+	return mSynchronizer->locked();
+}
+
+cf::void_t cf::task::scopedLock::unlock()
+	throw (cf::exception)
+{
+	mSynchronizer->unlock();
 }
 
