public static void dumpNumberToFile ( final Path filePath , final long num ) throws IOException { try ( final BufferedWriter writer = Files . newBufferedWriter ( filePath , StandardCharsets . UTF_8 ) ) { writer . write ( String . valueOf ( num ) ) ; } catch ( final IOException e ) { log . error ( "Failed to write the number {} to the file {}" , num , filePath , e ) ; throw e ; } }
Dumps a number into a new file .