This block of code to create an empty file of a particular size could be moved into utility classes which contain other file handling helper methods such as `org.apache.kafka.common.utils.Utils.java`    You could name it: `FileChannel Utils.createPreallocatedFile(Path, Size)`