Setting file properties when creating a file

Here's a simple question, however I fear there wont be a simple answer :(

I am creating a file (a .gzip which is the source code of a webpage) and want to save one piece of data (the webpage's url) in the files "title" or "comments" property.

Using XP you can view these properties when right-clicking a file and viewing its properties. However can you set such properties using Java and if possible, read them?

Many thanks.

[451 byte] By [Mylesa] at [2007-11-27 10:35:09]
# 1

> Using XP you can view these properties when

> right-clicking a file and viewing its properties.

> However can you set such properties using Java and if

> possible, read them?

Depends. It's very certainly not the property of any File (or file system entry). Some files like ZIPs and JPGs can be tagged by embedding some information in the file header, whether Java can write/add these depends on the tools you use.

CeciNEstPasUnProgrammeura at 2007-7-28 18:33:22 > top of Java-index,Java Essentials,Java Programming...
# 2

Well the file meta data (like title/comments etc) on XP is saved into alternate data streams (ADS) with support from the underlying file systems NTFS.

Well you could write to these ADS from Java, but you would be able to read the data programatically. This data would not easily be put into the predefined categories like title/comments

imran_ea at 2007-7-28 18:33:22 > top of Java-index,Java Essentials,Java Programming...