コード例 #1
0
 /// <summary>
 /// 写输出流,OutputFile有效时可用(不会抛出异常).
 /// </summary>
 /// <param name="Bytes">待写数据</param>
 /// <param name="Start">起始位置</param>
 /// <param name="Count">数量</param>
 public void WriteBytes(byte[] Bytes, int Start, int Count)
 {
     if (OutFS != null)
     {
         OutFS.Write(Bytes, Start, Count);
         _SendNum += Count;
         OutFS.Flush();
     }
 }
コード例 #2
0
 /// <summary>
 /// 关闭流
 /// </summary>
 public void Close()
 {
     if (InFS != null)
     {
         InFS.Close();
     }
     if (OutFS != null)
     {
         OutFS.Flush();
         OutFS.Close();
     }
 }