本文整理汇总了C#中NPOI.POIFS.FileSystem.NPOIFSFileSystem.GetBlockStoreBlockSize方法的典型用法代码示例。如果您正苦于以下问题:C# NPOIFSFileSystem.GetBlockStoreBlockSize方法的具体用法?C# NPOIFSFileSystem.GetBlockStoreBlockSize怎么用?C# NPOIFSFileSystem.GetBlockStoreBlockSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NPOI.POIFS.FileSystem.NPOIFSFileSystem
的用法示例。
在下文中一共展示了NPOIFSFileSystem.GetBlockStoreBlockSize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: NPOIFSDocument
/**
* Constructor for an existing Document
*/
public NPOIFSDocument(DocumentProperty property, NPOIFSFileSystem filesystem)
{
this._property = property;
this._filesystem = filesystem;
if (property.Size < POIFSConstants.BIG_BLOCK_MINIMUM_DOCUMENT_SIZE)
{
_stream = new NPOIFSStream(_filesystem.GetMiniStore(), property.StartBlock);
_block_size = _filesystem.GetMiniStore().GetBlockStoreBlockSize();
}
else
{
_stream = new NPOIFSStream(_filesystem, property.StartBlock);
_block_size = _filesystem.GetBlockStoreBlockSize();
}
}
示例2: NPOIFSDocument
public NPOIFSDocument(String name, int size, NPOIFSFileSystem filesystem, POIFSWriterListener Writer)
{
this._filesystem = filesystem;
if (size < POIFSConstants.BIG_BLOCK_MINIMUM_DOCUMENT_SIZE)
{
_stream = new NPOIFSStream(filesystem.GetMiniStore());
_block_size = _filesystem.GetMiniStore().GetBlockStoreBlockSize();
}
else
{
_stream = new NPOIFSStream(filesystem);
_block_size = _filesystem.GetBlockStoreBlockSize();
}
Stream innerOs = _stream.GetOutputStream();
DocumentOutputStream os = new DocumentOutputStream(innerOs, size);
POIFSDocumentPath path = new POIFSDocumentPath(name.Split(new string[] { "\\\\" }, StringSplitOptions.RemoveEmptyEntries));
String docName = path.GetComponent(path.Length - 1);
POIFSWriterEvent event1 = new POIFSWriterEvent(os, path, docName, size);
Writer.ProcessPOIFSWriterEvent(event1);
innerOs.Close();
// And build the property for it
this._property = new DocumentProperty(name, size);
_property.StartBlock = (/*setter*/_stream.GetStartBlock());
}