ZipEntry ze = new ZipEntry( entryName ); zos.putNextEntry( ze ); FileInputStream in = new FileInputStream( song.calculateAbsolutePath( daoSettings.getSettings() ) ); int len; byte buffer[] = new byte[1024];
String path = song.calculateAbsolutePath( daoSettings.getSettings() ); File fpath = new File( path ); fpath.delete();
FileInputStream in = new FileInputStream( song.calculateAbsolutePath( daoSettings.getSettings() ) ); int len; byte buffer[] = new byte[1024];
if ( mdosong != null ) String oldLocation = mdosong.calculateAbsolutePath( daoSettings.getSettings() ); boolean nameChanged = !song.getName().equals( mdosong.getName() ); String newLocation = mdosong.calculateAbsolutePath( daoSettings.getSettings() ); File fOld = new File( oldLocation ); if ( fOld.exists() )
String filePath = song.calculateAbsolutePath( settings ); File fsong = new File( filePath ); if ( fsong.exists() )
for ( MDOSong mdoSong : songs ) String absPath = mdoSong.calculateAbsolutePath( settings ); File fnew = new File( absPath ); if ( fnew.exists() )
public void playSong( String username, long sidSong, int clientQueuePosition ) throws IOException { MDOSong song = daoSong.get( username, sidSong ); if ( song != null ) { MessicRadioPlugin mrp = getPlugin(); File mp3song = new File( song.calculateAbsolutePath( daoSettings.getSettings() ) ); if ( mp3song.exists() ) { MessicRadioSong mrs = new MessicRadioSong(); mrs.songFile = mp3song; mrs.authorName = song.getAlbum().getAuthor().getName(); mrs.albumName = song.getAlbum().getName(); mrs.albumyear = song.getAlbum().getYear(); MDOAlbumResource mar = song.getAlbum().getCover(); if ( mar != null ) { mrs.coverImage = new File( mar.calculateAbsolutePath( daoSettings.getSettings() ) ); } mrs.songSid = song.getSid(); mrs.songName = song.getName(); mrs.trackNumber = song.getTrack(); mrs.albumGenre = ( song.getAlbum().getGenre() != null ? song.getAlbum().getGenre().getName() : "" ); mrs.albumComments = song.getAlbum().getComments(); mrs.clientQueuePosition = clientQueuePosition; mrp.castSong( mrs ); } } }
( flagExistingAlbum ? mdoSong.calculateAbsolutePath( oldAlbumPath, oldVolumes ) : mdoSong.calculateAbsolutePath( settings ) ); String theoricalFileName = mdoSong.calculateSongTheoricalFileName( mdoSong.getExtension(), replacementChar ); fnew = new File( mdoSong.calculateAbsolutePath( settings ) ); if ( !fold.getAbsolutePath().equals( fnew.getAbsolutePath() ) )