import java.io.*;
public class TestTransForm1 {
public static void main(String[] args) {
try {
OutputStreamWriter osw = new OutputStreamWriter(
new FileOutputStream("d:\\bak\\char.txt"));
osw.write("mircosoftibmsunapplehp");
System.out.println(osw.getEncoding());
osw.close();
osw = new OutputStreamWriter(
new FileOutputStream("d:\\bak\\char.txt", true),
"ISO8859_1"); // latin-1
osw.write("mircosoftibmsunapplehp");
System.out.println(osw.getEncoding());
osw.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
import java.io.*;
public class TestTransForm2 {
public static void main(String args[]) {
InputStreamReader isr =
new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
String s = null;
try {
s = br.readLine();
while(s!=null){
if(s.equalsIgnoreCase("exit")) break;
System.out.println(s.toUpperCase());
s = br.readLine();
}
br.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}

最新文章

  1. WinForm------TextEdit控件内容字体变*号
  2. Couldn't open file on client side, trying server side 错误解决
  3. post 与 get 在转码的区别
  4. 转 用 AXIOM 促进 XML 处理
  5. ASP长文章分页的两个方法,函数
  6. python上下文管理器及with语句
  7. jrae源码解析(一)
  8. java Json字符串转List<Map>类型
  9. Java 开机启动
  10. ubantu下su命令Authentication failure失败的解决方式
  11. 【Tomcat】性能优化
  12. 深入理解Git (一) - 元数据
  13. MySql关联子查询
  14. Oracle 默认的driectory 目录
  15. Springmvc ajax跨域请求处理
  16. Linux Mysql 卸载
  17. bootstrap-table设置某列序号自增
  18. java实现数据库分页
  19. Pix mesa 自动化测试
  20. Trident学习笔记(二)

热门文章

  1. RestTemplate中headers中添加Host不生效
  2. python 面向对象七 property() 函数和@property 装饰符
  3. bzoj 2151: 种树【贪心+堆】
  4. bzoj 4823: [Cqoi2017]老C的方块【最大权闭合子图】
  5. Tensor Operation
  6. Java标准输入流system.in报错: java.util.NoSuchElementException解决方法
  7. Qt事件系统之三:键盘事件
  8. 牛客小白月赛5-I-区间(差分求前缀和+一次暴力统计)
  9. 使用dubbox开发REST应用
  10. Web自动化测试框架-PO模式