Yes and no. If you try using a BufferedReader
to read an MP3 file, it will just read a bunch of gibberish since the MP3 file encoding is not just string data. Remember that everything stored on a computer is just a bunch of 1s and 0s, so it will just try to interpret that as text, but it will look like gibberish.
Instead, you should use a library as I already mentioned over in Coding challenge - #2 by jmrunkle. If you use JLayer, you would end up with something like this:
try (Player jlPlayer = new Player(
new BufferedInputStream(
new FileInputStream(mp3FileToPlay)))) {
jlPlayer.play();
}
NOTE: that is extremely simplified, but may still be useful for you.