License:
Version:
Author:
1 2 3 4 5 6 | auto input = new DataInput (new File ("path")); auto x = input.int32; auto y = input.float64; auto l = input.read (buffer); // read raw data directly auto s = cast(char[]) input.array; // read length, allocate space input.close; |
required:
1 | auto text = cast(char[]) input.get; |
1 2 3 4 5 6 | auto output = new DataOutput (new File ("path", File.WriteCreate)); output.int32 (1024); output.float64 (3.14159); output.array ("string with length prefix"); output.write ("raw array, no prefix"); output.close; |