日期:2014-05-17 浏览次数:21042 次
byte[] buffer = new byte[1024];
buffer = Encoding.UTF8.GetBytes(fileName);//fileName是string类型
FileStream fs = new FileStream("xxx", FileMode.Open);//xxx为文件路径
byte[] buffer = new byte[fs.Length];
fs.Write(buffer, 0, buffer.Length);
byte[] buffer;
buffer = Encoding.UTF8.GetBytes(fileName);//fileName是string类型
// ...
read.Read(buffer, 0, buffer.Length);