File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes I/O and Streams and the fly likes Access/Edit File Summary Information Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Access/Edit File Summary Information" Watch "Access/Edit File Summary Information" New topic

Access/Edit File Summary Information

Isaac Jones

Joined: Jun 18, 2004
Posts: 25
I was wondering if there is a way to access and edit the file summary information (ex. for mp3 or movie files) preferably in java. i'm using java 1.6 but i haven't found any classes that support that. Or are there maybe other libraries that allow to do that. I've heard there's a way with JNI, but I'm not familiar at all with this. So if there was another way i'd be more than happy.

Greg Charles

Joined: Oct 01, 2001
Posts: 2968

A file is just a collection of bytes. If it contains summary information, then that's included with the collection of bytes in some proprietary way based on what kind of file it is. For example, an MP3 might have the artist, album, and song title in what I seem to remember is called Tag 3 format. The file's metadata generally comes at the beginning of the file before the binary data, e.g., the song or movie, but it could come at the end. There has to be a defined way to find it, but depending on the protocol, that information may or may not be public.

That means reading summary data from one of these files is just a matter of opening the file, reading the correct section of it, and understanding what you read. It's very likely someone has already written Java classes to help you parse this information for MP3s and the popular movie formats. Your other choices are looking up specifications on the file formats you are interested in, or just opening the files in a binary editor and working it out for yourself.
Shubhashish Bhowmik

Joined: Mar 23, 2010
Posts: 1
Hi there,

With the mp3 file we have idv1 and idv2 tag support information and it can be read easily. But unfortunately i didnt find anything like that with the movie file formats .mov/.avi/.wmv. It would be great help if you can share some information or some hint. thanks in advance..
I agree. Here's the link:
subject: Access/Edit File Summary Information
It's not a secret anymore!