本文整理汇总了C#中ICSharpCode.SharpZipLib.Zip.ZipHelperStream.WriteLEShort方法的典型用法代码示例。如果您正苦于以下问题:C# ZipHelperStream.WriteLEShort方法的具体用法?C# ZipHelperStream.WriteLEShort怎么用?C# ZipHelperStream.WriteLEShort使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICSharpCode.SharpZipLib.Zip.ZipHelperStream
的用法示例。
在下文中一共展示了ZipHelperStream.WriteLEShort方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetData
public byte[] GetData()
{
byte[] buffer;
using (MemoryStream stream = new MemoryStream())
{
using (ZipHelperStream stream2 = new ZipHelperStream(stream))
{
stream2.IsStreamOwner = false;
stream2.WriteLEInt(0);
stream2.WriteLEShort(1);
stream2.WriteLEShort(0x18);
stream2.WriteLELong(this._lastModificationTime.ToFileTime());
stream2.WriteLELong(this._lastAccessTime.ToFileTime());
stream2.WriteLELong(this._createTime.ToFileTime());
buffer = stream.ToArray();
}
}
return buffer;
}
示例2: GetData
/// <summary>
/// Get the binary data representing this instance.
/// </summary>
/// <returns>The raw binary data representing this instance.</returns>
public byte[] GetData()
{
using (MemoryStream ms = new MemoryStream())
using (ZipHelperStream helperStream = new ZipHelperStream(ms))
{
helperStream.IsStreamOwner = false;
helperStream.WriteLEInt(0); // Reserved
helperStream.WriteLEShort(1); // Tag
helperStream.WriteLEShort(24); // Length = 3 x 8.
helperStream.WriteLELong(lastModificationTime_.ToFileTime());
helperStream.WriteLELong(lastAccessTime_.ToFileTime());
helperStream.WriteLELong(createTime_.ToFileTime());
return ms.ToArray();
}
}
示例3: GetData
public byte[] GetData()
{
byte[] result;
using (MemoryStream memoryStream = new MemoryStream())
{
using (ZipHelperStream zipHelperStream = new ZipHelperStream(memoryStream))
{
zipHelperStream.IsStreamOwner = false;
zipHelperStream.WriteLEInt(0);
zipHelperStream.WriteLEShort(1);
zipHelperStream.WriteLEShort(24);
zipHelperStream.WriteLELong(this._lastModificationTime.ToFileTime());
zipHelperStream.WriteLELong(this._lastAccessTime.ToFileTime());
zipHelperStream.WriteLELong(this._createTime.ToFileTime());
result = memoryStream.ToArray();
}
}
return result;
}