import javax.imageio.*; import javax.imageio.stream.*; static FileImageOutputStream fileImageOutputStream(File f) throws IOException { ret new FileImageOutputStream(mkdirsForFile(f)); }