Index: trunk/ab5.0/jenga/include/common/File.h
===================================================================
--- trunk/ab5.0/jenga/include/common/File.h	(revision 582)
+++ trunk/ab5.0/jenga/include/common/File.h	(revision 583)
@@ -35,4 +35,37 @@
 		return result;
 	}
+
+	bool ReadBinary( Binary &binary )
+	{
+		HANDLE hFile = CreateFile( filePath.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL );
+		if( hFile == INVALID_HANDLE_VALUE )
+		{
+			return false;
+		}
+		int size = GetFileSize( hFile, NULL );
+
+		char *temp = static_cast<char *>(calloc( size + 1, 1 ));
+		DWORD dummy;
+		ReadFile( hFile, temp, size, &dummy, NULL );
+		CloseHandle(hFile);
+
+		binary.Put( temp, size );
+
+		return true;
+	}
+
+	bool WriteBinary( const Binary &binary )
+	{
+		HANDLE hFile = CreateFile(filePath.c_str(),GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);
+		if(hFile==INVALID_HANDLE_VALUE)
+		{
+			return false;
+		}
+		DWORD dw;
+		WriteFile(hFile,binary.GetBuffer(),binary.GetSize(),&dw,NULL);
+		CloseHandle(hFile);
+
+		return true;
+	}
 };
 
