Package com.jitcaforwin.id3

Examples of com.jitcaforwin.id3.ID3Tag


   * @throws ID3TagException
   *             if an error occurs during initialization
   */
  public static ID3Tag getID3Tag(Track track) throws ID3TagException {
    if (!track.isFileOrCDTrack()) {
      throw new ID3TagException("The track is not a FileOrCDTrack. As a result it does not have tags!");
    }
    return getID3Tag(track.getFileOrCDTrack());
  }
View Full Code Here


   * @throws ID3TagException
   *             if an error occurs during initialization
   */
  public static ID3Tag getID3Tag(Track track) throws ID3TagException {
    if (!track.isFileOrCDTrack()) {
      throw new ID3TagException("The track is not a FileOrCDTrack. As a result it does not have tags!");
    }
    return getID3Tag(track.getFileOrCDTrack());
  }
View Full Code Here

    try {
      MP3File mp3File = new MP3File(file, NOT_WRITEABLE);
      return getID3Tag(mp3File);

    } catch (IOException e) {
      throw new ID3TagFileException(e, file);
    } catch (TagException e) {
      throw new ID3TagFileException(e, file);
    } catch (UnsupportedOperationException e) {
      throw new ID3Tagjid3libInternalException(e);
    }
  }
View Full Code Here

    if (mp3File.hasID3v2Tag()) {
      return new ID3v2TagImpl(mp3File);
    } else if (mp3File.hasID3v1Tag()) {
      return new ID3v1TagImpl(mp3File);
    } else {
      throw new ID3TagFileException("File does neither has a ID3v1 nor a ID3v2 tag");
    }
  }
View Full Code Here

 
  public static ID3Tag getID3Tag(File file) throws ID3TagFileException {
    final boolean NOT_WRITEABLE = false;

    if (file == null || !file.exists()) {
      throw new ID3TagFileNotFoundException(file);
    }

    if (isM4A(file)) {
      throw new ID3M4AException(file);
    }
View Full Code Here

  public String getArtistName() {
    return this.transformString(this.tag.getLeadArtist());
  }

  public String getAlbumArtistName() {
    throw new ID3TagInformationNotAvailableException("AlbumArtist is not available!");
  }
View Full Code Here

    super(file.getID3v1Tag());
    tag = file.getID3v1Tag();
  }

  public String getComposerName() {
    throw new ID3TagInformationNotAvailableException("Composer is not available in ID3v1!");
  }
View Full Code Here

  public String getArtistName() {
    return this.transformString(this.tag.getLeadArtist());
  }

  public String getAlbumArtistName() {
    throw new ID3TagInformationNotAvailableException("AlbumArtist is not available!");
  }
View Full Code Here

    } catch (IOException e) {
      throw new ID3TagFileException(e, file);
    } catch (TagException e) {
      throw new ID3TagFileException(e, file);
    } catch (UnsupportedOperationException e) {
      throw new ID3Tagjid3libInternalException(e);
    }
  }
View Full Code Here

      int separator = line.indexOf("-");
      int genreID = Integer.parseInt(line.substring(0, separator));

      String text = line.substring(separator + 1);

      IId3Genre genre = this.genreFactory.getGenre(text);
     
      assertEquals(text, genre.getName());
      assertEquals(genreID, genre.getId3Id());

    }

  }
View Full Code Here

TOP

Related Classes of com.jitcaforwin.id3.ID3Tag

Copyright © 2018 www.massapicom. 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.