@@ -0,0 +1,1510 @@
+package net.straylightlabs.hola.utils;%0A%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Aimport java.io.IOException;%0Aimport java.nio.file.Files;%0Aimport java.nio.file.Path;%0Aimport java.nio.file.Paths;%0A%0Apublic class Utils %7B%0A    private static int nextDumpPathSuffix;%0A    private final static Logger logger = LoggerFactory.getLogger(Utils.class);%0A%0A    static %7B%0A        nextDumpPathSuffix = 1;%0A    %7D%0A%0A    /**%0A     * Save @buffer to a new file beginning with @prefix. Append a sequential suffix to ensure we don't%0A     * overwrite existing files.%0A     * @param buffer The byte buffer to dump to disk%0A     * @param prefix The start of the file name%0A     */%0A    @SuppressWarnings(%22unused%22)%0A    public static void dumpBuffer(byte%5B%5D buffer, String prefix) %7B%0A        try %7B%0A            Path path = getNextPath(prefix);%0A            logger.info(%22Dumping buffer to %7B%7D%22, path);%0A            Files.write(path, buffer);%0A        %7D catch (IOException e) %7B%0A            logger.error(%22Error writing file: %7B%7D%22, e.getLocalizedMessage());%0A        %7D%0A    %7D%0A%0A    /**%0A     * Get the next sequential Path for a binary dump file, ensuring we don't overwrite any existing files.%0A     * @param prefix The start of the file name%0A     * @return Next sequential Path%0A     */%0A    public static Path getNextPath(String prefix) %7B%0A        Path path;%0A%0A        do %7B%0A            path = Paths.get(prefix, Integer.toString(nextDumpPathSuffix));%0A            nextDumpPathSuffix++;%0A        %7D while (Files.exists(path));%0A%0A        return path;%0A    %7D%0A%7D%0A

Add utility methods for dumping binary packets to disk.