import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;

ImageIO.write( aBufferedImage, "PNG" /* format desired */ , new File( "snap.png" ) /* target */ );