I want to extract the bytes from a wav file in Java and I don't know how. I tried this but it doesn't work:
public class AudioFiles {
public static void main(String[] args) throws FileNotFoundException {
File file= new File("audio.wav");
Scanner s= new Scanner(file);
System.out.println(s.nextLine());
To read a
.wav
file as bytes in Java, you can use the java.io package to create an input stream from the .wav file and then read the bytes from the input stream.