简单问题:如何把String 变成InputStream或者它的子类? 这样行不行?- 把String变成一个char[]- 把这个char[]wrap成一个java.io.InputStream 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 ByteArrayInputStream bais = new ByteArrayInputStream(str.getBytes()); FileOutputStream xmlStringOut = null;try{ xmlStringOut = new FileOutputStream("name");}catch(FileNotFoundException e){ System.out.println("You have to create a file");} String s = "EQWRQWRWQ";try{ xmlStringOut.write(s.getBytes());}catch(IOException e){} 三个超简单的小问题 java 关闭当前窗体后刷新父窗体 我的环境变量是否设置错误? 哪位大哥大姐教教我这个Java题怎么做(在线等) 急!请教如何屏蔽脏话.感激不尽! 救命的问题!!!!!急 求俄罗斯方块的设计思路 abstract class 的构造函数问题!!!(急) 初学者请教 错误:java.lang.nullpointerexception 用JAVA作应用程序服务器,使用SOCKET,如何定义通讯协议? 请问文件内容追加用什么方法?
try{
xmlStringOut = new FileOutputStream("name");
}catch(FileNotFoundException e){
System.out.println("You have to create a file");
}
String s = "EQWRQWRWQ";
try{
xmlStringOut.write(s.getBytes());
}catch(IOException e){}