public static void main(String[] params) throws Exception {
AudioInputStream is =
AudioSystem.getAudioInputStream(new
ByteArrayInputStream(new byte[] {
(byte)0x2E, (byte)0x73, (byte)0x6E, (byte)0x64, (byte)0x00,
(byte)0x00, (byte)0x00, (byte)0x18,
(byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0x00,
(byte)0x00, (byte)0x00, (byte)0x03,
(byte)0x00, (byte)0x00, (byte)0x1F, (byte)0x40, (byte)0x00,
(byte)0x00, (byte)0x00, (byte)0x01,
(byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
(byte)0x00, (byte)0x00, (byte)0x00,
}));
if (is.getFrameLength() != AudioSystem.NOT_SPECIFIED) {
System.out.println("frame length should be NOT_SPECIFIED, but is: "+is.getFrameLength());
failed=true;
}
//assertTrue(is.getFrameLength() == AudioSystem.NOT_SPECIFIED);
//assertTrue(is.read(new byte[8]) == 8);
//assertTrue(is.read(new byte[2]) == -1);
if (failed) throw new Exception("Test FAILED!");
System.out.println("Test Passed.");
}
AuNotSpecified.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:openjdk-jdk10
作者:
评论列表
文章目录