传输缓冲的文件 [英] Transferring a buffered file

查看:75
本文介绍了传输缓冲的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好,这是我的应用程序的工作方式:

Ok this is how my app works:

>

推荐答案

当心FileMode.OpenOrCreate.这将打开文件(如果存在),并且仅写入文件的第一部分.之前的内容将不会被擦除,从而使数据超出了第一个记录的范围.使用FileMode.Create从头开始重新创建文件.

Watch out of FileMode.OpenOrCreate.  That will open the file if it exists and only write the first part of the file.  What was there before won't be erased, making the data beyond the first record garbage.  Use FileMode.Create to recreate the file from scratch.


这篇关于传输缓冲的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆