在Java中阅读Windows文件摘要属性(标题,主题,作者) [英] Reading Windows file summary properties (title, subject, author) in Java
问题描述
如果您在Windows中右键单击文件并选择属性,则可以在de 摘要选项卡中管理某些属性,例如标题,主题和作者,如在这个例子中:
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:
我试图找到一种使用 Java 来阅读这些属性的方法。是否有图书馆?这甚至可能吗
提前感谢!
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
推荐答案
信息存储在名为♣摘要信息的NTFS 备用数据流中 - 不知道Java是否支持teh通过冒号记录阅读ADS数据。
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.
更新:显然这应该工作:
FileInputStream in = new FileInputStream("test.txt:\u2663SummaryInformation");
你必须自己弄清楚格式。
You'll have to figure out the format yourself.
这篇关于在Java中阅读Windows文件摘要属性(标题,主题,作者)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!