Hello, I'm using FileOutputStream to save in one document some information, but instead a FileOutputStream I want to create a File. Now I'm doing in two steps but I want to do that in one step. I don't know if it's possible do that I want:
FileOutputStream out = new FileOutputStream("C:/name.eml");
mensaje.writeTo(out);
File emlFile = new File("C:/name.eml");
I want to do the same but doing something like this.
File emlFile = new File("C:/name.eml");
mensaje.writeTo(emlFile);
The problem is that the method writeTo only give me the chance to save like a FileOutputStream.
Thanks