Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Sebastian Newsgroups: comp.lang.java.programmer Subject: File object and serialization - information is lost Date: Wed, 08 Jun 2011 19:59:31 +0200 Organization: albasani.net Lines: 17 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net h4GFnV1bE10yCHLvZsKHcVl2NDA1W/HgCPTJo/f+/eM8aOuyW0pC7IQG1TEOr512SNwkdpqgRCNwtPb9sEVKtjwTZbt4g73VoPNLbqQtqTpgM0akv73vWLjF8vBGAZdk NNTP-Posting-Date: Wed, 8 Jun 2011 17:59:31 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="vI2S0cA/RwcdiMwAC/VcTqykSEut5DPJxDPvzKrtatFb6AJV8GQGzco71gNnG2mtqZulad0jQM9TMBkEjlWPr2PeKzZlSgws6dbYfe3xTq1MPTk3bJDbYRDLnGIXRRgC"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 Cancel-Lock: sha1:+RxgY8s31vzoD2eg0v3yqaZ8l3I= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:5120 Hello there, I seem to misunderstand a thing about java.io.File. I wanted to use the File object to transport information files existing in one place (basically, a directory listing) to another place. The API says File serves as an abstract representation of a file, and that it implements Serializable. However, after Serialization/Deserialization (in another JVM) the methods lastModified() and length() return 0. This is not what I expected. Is there a standard object to transport this information, or do I have to define my own? -- Sebastian