hi ive been doing a project in which metadata for various filetypes(html, xml etc.,) are needed. are there any existing api's to do the above. ideas and suggestions regardin the above are welcome. thanks in advance.
A:
Properties prop = new Properties();
try {
prop.load(new FileInputStream("filename.properties"));
} catch (IOException e) {
}
// Write properties file.
try {
prop.store(new FileOutputStream("filename.properties"), null);
} catch (IOException e) {
}
What your after is the file properties. You can access them like above.
Here is an example of the contents of a properties file:
# a comment
! a comment
a = a string
b = a string with escape sequences \t \n \r \\ \" \' \ (space) \u0123
c = a string with a continuation line \
continuation line
d.e.f = another string
Kieran
2010-01-05 03:09:13