示例#1
0
        private static string[] StreamReadStr(string filePath)
        {
            FileStream   stream = null;
            BinaryReader reader = null;

            try
            {
                FileUtil.InitBinReadStream(ref stream, ref reader, filePath);
                return(FileUtil.StreamReadStrFromBinFile(reader));
            }
            catch (SeeSharpFileException)
            {
                throw;
            }
            catch (ApplicationException ex)
            {
                throw new SeeSharpFileException(SeeSharpFileErrorCode.RuntimeError,
                                                i18n.GetFStr("Runtime.ReadFail", ex.Message), ex);
            }
            finally
            {
                FileUtil.ReleaseResource(reader);
                FileUtil.ReleaseResource(stream);
            }
        }