I want to drop a .txt file on a shared network drive. The path is a map on a networkdrive which requires credentials (login and password). Can i pass these parameters using FileOutputStream?
FileOutputStream fos;
DataOutputStream dos;
try {
File file= new File(path + "/" + fileName + ".txt");
fos = new FileOutputStream(file);
dos=new DataOutputStream(fos);
dos.writeChars(stringContent);
dos.close();
fos.close();
}
catch(IOException eio){
}
Thank you.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…