Exemplo n.º 1
0
        private static void StreamWriteData(string filePath, Array data, long byteSize, WriteMode writeMode)
        {
            FileStream stream = null;

            try
            {
                FileUtil.InitBinWriteStream(ref stream, filePath, writeMode);
                FileUtil.StreamwriteDataToFile(stream, data, byteSize, 0);
            }
            catch (SeeSharpFileException)
            {
                throw;
            }
            catch (ApplicationException ex)
            {
                throw new SeeSharpFileException(SeeSharpFileErrorCode.RuntimeError,
                                                i18n.GetFStr("Runtime.WriteFail", ex.Message), ex);
            }
            finally
            {
                FileUtil.ReleaseResource(stream);
            }
        }