[英]Saving A File To A Directory
So right now, I have a server that runs on OOS/OIS and I'm trying to send a file and save it to a certain directory in my client program. 因此,现在,我有一台运行在OOS / OIS上的服务器,我正在尝试发送文件并将其保存到客户端程序中的某个目录中。 I can send the file fine, but how exactly do I save the file on the client side?
我可以很好地发送文件,但是如何在客户端保存文件呢? Thanks in advance to any responders!
在此先感谢任何响应者!
Open a java.io.FileOutputStream
and write the data to the stream, and then close it. 打开一个
java.io.FileOutputStream
并将数据写入流,然后将其关闭。 Unless its text, then create a java.io.FileWriter
and write your text to that. 除非文本是文本,否则创建一个
java.io.FileWriter
并将文本写入其中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.