Is it possible to format output to a text file from Java (ie limiting the number of decimal places shown of numbers.) in a similar way to using printf to print formatted text on the screen.