public static int run(String argv[], java.io.PrintStream out) {
String testCaseID = "LineListener2001";
log.println("===== " + testCaseID + " =====");
boolean failed = false;
Line l = null;
// get the default SourceDataLine
DataLine.Info s_info = new DataLine.Info(SourceDataLine.class, null);
Line.Info infos[] = AudioSystem.getSourceLineInfo( s_info );
if( infos.length < 1 ) {
log.println("Line.Info array == 0");
return STATUS_PASSED;
}
try {
l = AudioSystem.getLine(infos[0]);
} catch(SecurityException lue) {
log.println("SecurityException");
return STATUS_PASSED;
} catch (LineUnavailableException e1) {
log.println("LUE");
return STATUS_PASSED;
} catch (IllegalArgumentException iae) {
log.println("IllegalArgumentException should not be thrown "
+ "for supported line");
iae.printStackTrace(log);
return STATUS_FAILED;
}
out.println("Passed.");
return STATUS_PASSED;
}
GetLine.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:openjdk-jdk10
作者:
评论列表
文章目录