Convert A File To Byte Arrary Function
2012-04-01 14:49
197 查看
public byte[] ReadByteArrayFromFile(string fileName) { byte[] buff = null; FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read); BinaryReader br = new BinaryReader(fs); long numBytes = new FileInfo(fileName).Length; buff = br.ReadBytes((int)numBytes); return buff; }
相关文章推荐
- Java: convert a file to a byte array, then convert byte array to a file.
- TT:Number overflow for TO_CHAR function -- file "numberAPI.c"
- convert a byte array to a hexadecimal string
- mac下php编程出现php [function.move-uploaded-file]failed to open stream
- (转)Call to undefined function mb_convert_encoding()
- php file_get_contents失败[function.file-get-contents]: failed to open stream: HTTP request failed!解决
- sublime can not convert file encoding of xx to GBK,it was saved as UTF-8 instead:unkown encoding:GBK
- Convert stardict dict to txt file
- Function to Convert Only First Letter Capital of each word in a sentence
- safe convert string to integer function
- Convert a byte[] array to readable string format. This makes the "hex" readable!
- PHP解决[function.file-get-contents]: failed to open stream: HTTP request failed!
- How do I convert GFF file to a GTF file? 怎么把gff文件变成gtf文件
- How to convert Java Key Store file to pem/key for nginx
- Convert a string to a byte array and vica-versa in C#
- how to extract and convert audio file formats
- Convert a wave image to x-y function matlab
- Recursive function convert to Non-Recursive function
- [Linux cmd line] How to convert a binary file into output in C include file style.
- Astyle Cannot convert to multi-byte string, reverting to English 问题解决办法-重新编译