Examples of LastFmTrack


Examples of net.jlastfm.model.LastFmTrack

        this.playlist = this.getPlaylist();
        it = this.playlist.iterator();
        continue;
      }
     
      LastFmTrack currentTrack = it.next();     
      // Read stream
      BufferedInputStream is = null;
      try {
        URL trackUrl = new URL(currentTrack.getLocation());
        URLConnection connection = trackUrl.openConnection();
        is = new BufferedInputStream(connection.getInputStream());
       
        byte[] buffer = new byte[2048];
        int bytesRead = 0;
       
        synchronized(this.listeners) {
          for (LastFmListener listener : this.listeners) {
            listener.startTrack(currentTrack.getCreator(), currentTrack.getTitle(), currentTrack.getAlbum());
          }
        }
       
        while (!this.skipTrack && this.connected && (bytesRead = is.read(buffer)) > -1) {
          byte[] currentData = new byte[bytesRead];
View Full Code Here

Examples of net.jlastfm.model.LastFmTrack

    else if (name.equals("trackList")) {
      this.tracklistData = true;
      this.playlistData = false;
    }
    else if (this.tracklistData && name.equals("track")) {
      this.currentTrack = new LastFmTrack();
    }
    else if (this.tracklistData && name.equals("link")) {
      this.currentAttribute = attributes.getValue("rel");
    }
  } 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.