KLALB2.3
This commit is contained in:
@@ -30,15 +30,17 @@ public class StreamBridge extends Task{
|
||||
// fos.write(b, 0, v);
|
||||
out.write(b,0,v);
|
||||
out.flush();
|
||||
if(delay>0)
|
||||
if(delay>0) {
|
||||
try {
|
||||
Thread.sleep(delay);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}else {
|
||||
Thread.yield();
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
// TODO 自动生成的 catch 块
|
||||
e.printStackTrace();
|
||||
}finally {
|
||||
/*if(fos!=null)
|
||||
@@ -51,14 +53,12 @@ public class StreamBridge extends Task{
|
||||
if(in!=null)
|
||||
in.close();
|
||||
} catch (IOException e) {
|
||||
// TODO 自动生成的 catch 块
|
||||
e.printStackTrace();
|
||||
}
|
||||
try {
|
||||
if(in!=null)
|
||||
out.close();
|
||||
} catch (IOException e) {
|
||||
// TODO 自动生成的 catch 块
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user