/* * $ProjectName$ * $ProjectRevision$ * ----------------------------------------------------------- * $Id$ * ----------------------------------------------------------- * * $Author$ * * Description: * * Copyright 2002-2003 Tor-Einar Jarnbjo * ----------------------------------------------------------- * * Change History * ----------------------------------------------------------- * $Log$ * Revision 1.1 2005/07/11 15:42:36 hcl * Songdb java version, source. only 1.5 compatible * * Revision 1.1.1.1 2004/04/04 22:09:12 shred * First Import * * Revision 1.2 2003/03/16 01:11:12 jarnbjo * no message * * */ package de.jarnbjo.vorbis; import java.io.*; import java.util.*; import de.jarnbjo.util.io.BitInputStream; /** */ public class CommentHeader { public static final String TITLE = "TITLE"; public static final String ARTIST = "ARTIST"; public static final String ALBUM = "ALBUM"; public static final String TRACKNUMBER = "TRACKNUMBER"; public static final String VERSION = "VERSION"; public static final String PERFORMER = "PERFORMER"; public static final String COPYRIGHT = "COPYRIGHT"; public static final String LICENSE = "LICENSE"; public static final String ORGANIZATION = "ORGANIZATION"; public static final String DESCRIPTION = "DESCRIPTION"; public static final String GENRE = "GENRE"; public static final String DATE = "DATE"; public static final String LOCATION = "LOCATION"; public static final String CONTACT = "CONTACT"; public static final String ISRC = "ISRC"; private String vendor; private HashMap comments=new HashMap(); private boolean framingBit; private static final long HEADER = 0x736962726f76L; // 'vorbis' public CommentHeader(BitInputStream source) throws VorbisFormatException, IOException { if(source.getLong(48)!=HEADER) { throw new VorbisFormatException("The identification header has an illegal leading."); } vendor=getString(source); int ucLength=source.getInt(32); for(int i=0; i