7

If you right-click on a file in Windows and select Properties, you can manage some properties in de Summary tab, such as Title, Subject and Author, like in this example:

alt text

I'm trying to find a way to read these properties using Java. Is there a library for this? Is this even possible? Thanks in advance!

Peter

p.mesotten
  • 1,402
  • 1
  • 14
  • 26

2 Answers2

5

That information is stored in an NTFS Alternate Data Stream named "♣SummaryInformation" - not sure if Java supports teh reading of ADS data via the colon notation.

Update: Apparently this should work:

FileInputStream in = new FileInputStream("test.txt:\u2663SummaryInformation");

You'll have to figure out the format yourself.

Michael Borgwardt
  • 342,105
  • 78
  • 482
  • 720
  • do you have a reference URL for the name of this special stream? The links you provided are great but don't seem to cover this special ADS. – Andreas Dolk Nov 04 '10 at 15:24
  • @Andreas_D: I just added the metadata to a file and listed its streams using a tool I found here: http://www.flexhex.com/docs/articles/alternate-streams.phtml – Michael Borgwardt Nov 04 '10 at 15:37
0

In Java 7 it may work, but until then you have to use a native dll, to get that information.

Christian Kuetbach
  • 15,850
  • 5
  • 43
  • 79