@Override
public AudioInputStream getAudioInputStream(final InputStream stream)
throws UnsupportedAudioFileException, IOException {
stream.mark(200); // The biggest value which was historically used
try {
final StandardFileFormat format = getAudioFileFormatImpl(stream);
// we've got everything, the stream is supported and it is at the
// beginning of the audio data, so return an AudioInputStream
return new AudioInputStream(stream, format.getFormat(),
format.getLongFrameLength());
} catch (UnsupportedAudioFileException | EOFException ignored) {
// stream is unsupported or the header is less than was expected
stream.reset();
throw new UnsupportedAudioFileException();
}
}
SunFileReader.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:openjdk-jdk10
作者:
评论列表
文章目录