Author: alanmc
Date: 2008-02-03 17:45:41 -0500 (Sun, 03 Feb 2008)
New Revision: 94723
Modified:
trunk/bitsharp/src/MonoTorrent/MonoTorrent.Common/BitField.cs
Log:
Added helper method
Modified: trunk/bitsharp/src/MonoTorrent/MonoTorrent.Common/BitField.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent/MonoTorrent.Common/BitField.cs
2008-02-03 22:08:44 UTC (rev 94722)
+++ trunk/bitsharp/src/MonoTorrent/MonoTorrent.Common/BitField.cs
2008-02-03 22:45:41 UTC (rev 94723)
@@ -524,6 +524,13 @@
buffer[byteindex] = temp;
}
+ internal byte[] ToByteArray()
+ {
+ byte[] data = new byte[LengthInBytes];
+ ToByteArray(data, 0);
+ return data;
+ }
+
/// <summary>
/// Updates the truecount after the bitfield has been altered through
And(), Or() etc
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches