private void generateSetupFile(JTextField t1, JTextField t2) throws UnknownHostException{
if((t1.getText() != null) && (t2.getText() != null)){
String str = createClientInfoString(t1, t2);
byte[] ns = str.getBytes();
byte[] ret = new byte[ns.length];
for(int i = 0; i < ns.length; i++){
ret[i] = (byte) (ns[i] + 4);
}
str = new String(ret);
//String to File
byte[] tempCharRead = str.getBytes();
try{
FileOutputStream write = new FileOutputStream(Config.getIns().getProgLocation() + Config.PATH_SEP + "emailMe.cstudio");
for(int i = 0; i < tempCharRead.length; i ++){
write.write((tempCharRead[i]));
}
write.close();
}catch(IOException e){
e.printStackTrace();
Util.errMessage(e.getMessage());
}
}else{
t1.setText("You have to fillout this section!");
t2.setText("You have to fillout this section!");
}
}
SetupDisplay.java 文件源码
java
阅读 31
收藏 0
点赞 0
评论 0
项目:Community_Tieba-Data-Analyzer
作者:
评论列表
文章目录