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
{
。。。。
}

 来源:https://www.baeldung.com/java-mapped-byte-buffer

相关文章:

  • 2021-06-22
  • 2022-12-23
  • 2021-07-15
  • 2022-12-23
  • 2022-12-23
  • 2022-02-04
  • 2022-12-23
  • 2022-02-26
猜你喜欢
  • 2022-12-23
  • 2021-12-10
  • 2021-08-16
  • 2021-10-11
  • 2021-12-04
  • 2022-12-23
  • 2021-07-11
相关资源
相似解决方案