java BufferedReader和InputStreamReader的区别
BufferedReader:
Read text from a character-input
stream, buffering characters so as to provide for the
efficient reading of characters, arrays, and lines.
InputStreamReader:
An InputStreamReader is a bridge from byte streams to
character streams: It reads bytes and decodes them
into characters using a specified charset.
相关文档:
昨天看到留言,于是今天又把一些功能加进进去了
比如,
1,程序可以最小化到系统托盘区
2,程序可以批量保存所有截过的图片
3,修正了以前的一个小BUG,那就是输入保存图片的文件名时,如果没有输入后缀名,将保存正常,如果输入了后缀名,将会保存格式出错
打包文件请点击这里下载,dist文件夹里面的JAR文件是可以双击执行的
感 ......
其技巧就是:定义一个简单接口,并在该接口中声明我们要调用的方法,一般可以应用在键盘鼠标事件跟踪。
下面举一个例子:
假定我们希望在某个事件发生时得到通知。我们可以定义一个接口:
/*
* 在某个事件发生时得到通知.
*/
public interface InterestingEvent {
public void interestingEvent() ......
1. 创建线程(继承Thread和实现runnable接口) class SubThread {
private class InnerThread extends Thread {
@Override
public void run() {
System.out.println(Thread.currentThread().getName());
super.run();
}
}
public Thread getThread() {
return new InnerThread();
}
}
......
public static void main(String[] args){
SimpleDateFormat da = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
Calendar calendar = Calendar.getInstance();
Date date = calendar.getTime();
String aimTime ="2010-02-03 17:30:00.000";
int count = 0;
Date aimDate = d ......