How to put a time-stamp on a file?

You know when a file is created, the current date and time is recorded. You can see it by explorer. If I am going to put a given time and date in the file, how to do it?Thanks
[189 byte] By [ardmorea] at [2007-11-27 3:30:05]
# 1

If you just write to the file with a Writer or OutputStream, the timestamp will be updated. (Make sure you close() the stream or writer when you're done.)

If you just want to change the timestamp without writing to the file, java.io.File has setLastModified.

http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html

jverda at 2007-7-12 8:33:06 > top of Java-index,Java Essentials,Java Programming...