To read the file in a list, create a new category called ListUtils and public static ListElement readMP3List (String fileName) Write the method. IOException throws the name of the file and returns the file back to the top of the list that contains the objects. In ReadMP3List, you should open the file name using java.io.buffferedReader and java.io.fileReader classes and read one line at a time. You must separate each line in your filename, artist, etc., and then use these values to populate a new MP3Info object. Then you create a new listal object in which you create the MP3 infographic object that you just created and put it in your list.
So far I have found: The file has several rows of names, artists, etc., in which I have to separate. I'm really confused about how to use split (regex) to accomplish this. An example of the file is: fileName Artist song name album trackmom number second year style \ n I think this is what you need:
string fast =" album name artist song name album track number number seconds "; String [] data = fast. Split (""); // white space if tab is replaced by "\ t" string filename = data [0]; String artist = data [1]; String song name = data [2]; String album = data [3]; String trackname = data [4]; String numSeconds = data [4];
Comments
Post a Comment