当我尝试从我的flashdrive中读取一些文件时,我总是收到错误。所有文件都包含左括号但不包含右括号。我有太多文件可以单独更改每个文件。
这是我的代码:
String src;
src = "C:\\Users\\Marc\\Desktop\\Musik\\02 The Uncrushables (feat. ILL Bill.mp3"
File tempMP3 = new File(src);
我收到错误消息:
Exception in thread "main" org.farng.mp3.TagException: Unable to create FilenameTag
at org.farng.mp3.MP3File.<init>(Unknown Source)
at org.farng.mp3.MP3File.<init>(Unknown Source)
at org.farng.mp3.MP3File.<init>(Unknown Source)
at NewID3.main(NewID3.java:55)
Caused by: org.farng.mp3.TagException: Unmatched parenthesis in "02 The Uncrushables (feat. ILL Bill" at position : 20
at org.farng.mp3.filename.FilenameTagBuilder.parseParenthesis(Unknown Source)
at org.farng.mp3.filename.FilenameTagBuilder.createCompositeFromToken(Unknown Source)
at org.farng.mp3.filename.FilenameTagBuilder.createFilenameTagFromMP3File(Unknown Source)
... 4 more
Java Result: 1
有人知道如何解决这个问题吗?
提前感谢您的帮助!
PS:如果我没有足够清楚地解释自己,请告诉我,我会尽力做得更好。答案 0 :(得分:1)
这不是Java 本身。这是你正在使用的图书馆。
Caused by: org.farng.mp3.TagException: Unmatched parenthesis in "02 The Uncrushables (feat. ILL Bill" at position : 20
at org.farng.mp3.filename.FilenameTagBuilder.parseParenthesis(Unknown Source)
您的图书馆正在尝试解析文件名。一个简单的Java File
对象根本不关心。