Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果您在 Windows 中右键单击文件并选择Properties,您可以在 de Summary选项卡中管理一些属性,例如 Title、Subject 和 Author,如下例所示:
我正在尝试找到一种使用Java读取这些属性的方法。有这方面的图书馆吗?这甚至可能吗?提前致谢!
彼得
该信息存储在名为“♣SummaryInformation”的 NTFS备用数据流中- 不确定 Java 是否支持通过冒号表示法读取 ADS 数据。
更新:显然这应该工作:
FileInputStream in = new FileInputStream("test.txt:\u2663SummaryInformation");
您必须自己弄清楚格式。
在 Java 7 中它可能会工作,但在那之前你必须使用本机 dll 来获取该信息。
I have class (JavaBean if you want to call it like that)
class Tweet{ private millis; //number of millis since 1970 //other attributes and getters and setters, but i w