On Thu, 22 Nov 2012 19:47:09 -0800, markspace <-@.> wrote, quoted or
indirectly quoted someone who said :
>Each single Jar file is actually composed of many pieces of information.
> Class files, resources, libraries, the manifest file, etc. And yet
>it's all encoded into a single physical file. You never loose pieces of
>the file just because you made a copy of the file. You never have to
>worry about the meta data changing on a new system just because it's *new*.
Yes, yes! The OS people have proved incompetent at keeping metadata
separately from the file. We need formats where the metadata is part
of the file. With text files the most important piece of metadata is
the encoding. We do it sometimes, jpg, jar, csv (sometimes), video
files,
More generally the mime type is something you should be able to get
with File.getMime()
Imagine if you could do:
File.getEncoding()
File.getVersion()
File.getCopyrightOwner()
File.getCopyrightDate()
Meta data-compliant file would look just like any other but with a
header of the form
0 <meta>...</meta> 0
The meta data could be stored as XML. That gives you ability to add
extra info without having to change the standard.
the header is in ASCII 7-bit.
We should be using somewhat more complicated formats for files with
embedded metadata.
As an application programmer you want to be able to have the system
parse it for you. You get to pretend it is not there, but with the
ability to query it.
This reminds me a bit of the innovation of ANSI labelled mag tapes
back in the 60s.
The bBase people got this right long ago. You don't go writing files
without a header describing the format of what was in the file.
--
Roedy Green Canadian Mind Products
http://mindprod.com
Students who hire or con others to do their homework are as foolish
as couch potatoes who hire others to go to the gym for them.