摘要: Stream:数据流是一个抽象基类,派生FileStream实例与MemoryStream实例,自己本身不能实例化,只能由派生类来初始化.FileStream:文件流,主要对文件的操作,向文件写入数据,从文件中读取数据.实例化时,有一个文件路径参数.MemoryStream:内存流,实例化时,参数是字节数组byte[],字符串转化为字节数组: 1、byte[] str=Encoding.UTF8.getBytes("字符串"); 2、byte[] str=Encoding.GetEncoding("gb2312").GetBytes("字符串& 阅读全文
posted @ 2012-02-25 16:01 pantherbean 阅读(1321) 评论(0) 推荐(0) 编辑