| «« Java Signed Bytes and Decoding Flags | jid3rL with FramesGroup »» |
|
About
I'm Ryan Lowe, a Software Engineering graduate living in Ottawa, Canada. I like agile software development and Ruby on Rails.
I write this blog in Canadian English and don't use a spell checker. Typos happen.
Projects
» Full-time Ruby on Rails freelancer
» Full-time with Rails since May 2005 » Former committer for RadRails (now Aptana) » I also have a few Rails side-projects in development: 1. wheretogoinTO.com Toronto nightlife 2. Hey Heads Up! TODO list and sharing 3. Layered Genealogy family history research 4. foos for foosball scoring 5. fanconcert for music fans (on hold) Hiring Rails developers? I can telecommute by the hour from Ottawa, Canada »» Email: rails AT ryanlowe DOT ca
BulletBlog
Now hosted on Hey! Heads Up -- check it out!
Syndication
Pings
Recent
Derek Lowe's (Ryan's older brother) words at Ryan's funeral
blog@ryanlowe.ca no more Forging Email Headers: Good, Bad or Ugly? Sarcastic Dictionary (Part 1 of Many) Tags Hierarchies Twisting Rails is Risky Business Risky Business? My Take on Early Alphas Whoa, it's August 2007 Closing Comments A Postscript to "Growth at the grassroots" »» All Blog Posts
Linkage
del.icio.us/ryanlowe
technorati/ryanlowe.ca/blog Aurora Roy Jim Andrew Trasker Travis Kibbee Karen Dr. Unk Ayana Van Bloggers Joel Spolsky Robert Scoble Tim Bray Dave Winer Raymond Chen James Robertson Ruby/Rails Bloggers rubyonrails.org weblog David Heinemeier Hansson Dave Thomas James Duncan Davidson Mike Clark Jamis Buck Signal vs. Noise Tobias Luetke Amy Hoy: (24)slash7 Jeremy Voorhis Eclipse Bloggers Planet Eclipse EclipseZone Luis de la Rosa Eclipse Foundation Kim Horne Billy Biggs Ian Skerrett Mike Milinkovich Bjorn Freeman-Benson Denis Roy
Archives
|
The id3v2 Frames Hierarchy
There are many id3v2 frame types that allow instances of the same type with the same id to exist in a tag. One of the most frequently used is the Comments frame type. The Comments frame type has the following pieces of information: - language The id3v2 spec says that you can have multiple Comments frames as long as they don't have the same language and short description. So you might have a few comments with a different short description, or with the same short description but translated into several languages. As an aside, WinAmp and iTunes both use a zero length string for the short description of user-entered comments (iTunes likely just followed WinAmp's de facto standard). iTunes also has a few custom comments it puts into files you rip from CD with it. One appears to be a string of combined CDDB lookup numbers, one of which should actually be stored in the Unique File Identifier frame. The other comment appears to be normalization data. Other id3v2 frame types only let you have one frame of that type with the same id. This is true for the Text Information frame type, which holds values like artist name, album name, track number, etc. You can only have one Text Information frame in a tag with a given frame id. A good data structure for holding frames is a Java Map. Since each different frame type has frames with a unique id, you map the id to the frame. If the tag doesn't have a frame with that id, the map returns Oh yeah, those Comments frames -- they all have the same frame id. If I only used the frame id with the A With my Comments frame example, the path will be: 1. frame id Text Information frames can be found in the Last updated August 09, 2004 at 04:29 PM EST Comments
1) How do lists compare in Java? If I have ["eng","music history"], do I need the same instance to the above to compare equal, or will any ["eng","music history"] work? I had a similar situation at work, whereby an entry was uniquely identified by 2 numbers, not one. So my solution was as follows... I created a double hashtable, which would take two items and map it to a value. put(object firstKey, object secondKey, object aValue) Internally, I created a Pair object and I overwrote the Equals method (in .Net so capital E) so that the internals of DoubleHashtable were simply a hashtable. Here's my point. Internally, I wonder if it is worthwhile to have a ValueList - which compares equal if all the values within that list are the same (even thought it may be a different list itself). That way, you simply put your List into a ValueList and internally use a Hashtable (btw, what kind of map are you using?) as normal. » Posted by: dru at August 25, 2004 10:49 PMObject comparisons use the equals() method for equality. If you override equals() for a class, you should follow the contract that's specified in the JavaDocs for Object. There are basic rules you have to ensure your implementation of equals() follows. For Vector, which implements the List interface, it tests of the values are the same not the exact instances. If you made your own list class and didn't override equals(), then equals() returns false unless they are exactly the same object. This isn't what you'd want, so it's a good idea to always override equals() for data classes. » Posted by: Ryan at August 25, 2004 11:20 PM |