public static WavFile openWavFile(File file) throws IOException, WavFileException { FileChannel channel = new FileInputStream(file).getChannel(); MappedByteBuffer mappedByteBuffer = channel .map(FileChannel.MapMode.READ_ONLY, 0, channel.size()); return openWavFile(mappedByteBuffer); } public static WavFile openWavFile(ByteBuffer buffer) throws IOException, WavFileException { 。。。。 }