I think there already are a lot of java-libraries, which do exactly what you want. Give a try on google: http://jid3.blinkenlights.org/ This probably does what you want to achieve.
Inform us, if it is a handy library, so we (or you) can create a smart/short tutorial out of it.