How do i read a BufferedFile using read(ubyte[] buffer) when the buffer length is set at runtime?
问题 I have a binary file that is really a stack of files, the format is: lengh_of_subfile,subfile length_of_subfile is a 64-bit integer. I can read the long no problem but when I try to create a buffer for the subfile I get compile errors saying it cannot be read at compile time. What am I missing? I've written an identical extraction tool in erlang, PHP and C#... D is throwing me for a loop. void main(string args[]) { Stream file = new BufferedFile(args[1], FileMode.In); int counter = 0; while