public PlaylistV2 load(Path playlistPath){
  mLog.info("loading version 2 playlist file [" + playlistPath.toString() + "]");
  PlaylistV2 playlist=null;
  if (Files.exists(playlistPath)) {
    JAXBContext context=null;
    InputStream in=null;
    try {
      in=new FileInputStream(playlistPath.toString());
      try {
        context=JAXBContext.newInstance(PlaylistV2.class);
        Unmarshaller m=context.createUnmarshaller();
        playlist=(PlaylistV2)m.unmarshal(in);
      }
 catch (      JAXBException e) {
        mLog.error("jaxb exception while loading playlist: ",e);
      }
    }
 catch (    Exception e) {
      mLog.error("coulcn't open inputstream to load playlist [" + playlistPath.toString() + "]",e);
    }
 finally {
      if (in != null) {
        try {
          in.close();
        }
 catch (        IOException e) {
          mLog.error("exception while closing " + "the playlist file inputstream reader",e);
        }
      }
    }
  }
 else {
    mLog.info("PlaylistManager - playlist not found at [" + playlistPath.toString() + "]");
  }
  return playlist;
}

public PlaylistV2 load ( Path playlistPath ) { mLog . info ( "loading version 2 playlist file [" + playlistPath . toString ( ) + "]" ) ; PlaylistV2 playlist = null ; if ( Files . exists ( playlistPath ) ) { JAXBContext context = null ; InputStream in = null ; try { in = new FileInputStream ( playlistPath . toString ( ) ) ; try { context = JAXBContext . newInstance ( PlaylistV2 . class ) ; Unmarshaller m = context . createUnmarshaller ( ) ; playlist = ( PlaylistV2 ) m . unmarshal ( in ) ; } catch ( JAXBException e ) { mLog . error ( "jaxb exception while loading playlist: " , e ) ; } } catch ( Exception e ) { mLog . error ( "coulcn't open inputstream to load playlist [" + playlistPath . toString ( ) + "]" , e ) ; } finally { if ( in != null ) { try { in . close ( ) ; } catch ( IOException e ) { mLog . error ( "exception while closing " + "the playlist file inputstream reader" , e ) ; } } } } else { mLog . info ( "PlaylistManager - playlist not found at [" + playlistPath . toString ( ) + "]" ) ; } return playlist ; }
loads a version 2 playlist
