zhangzehao wrote:
For retaining the Mac specific file information when cross filesystem, I
tested the MacBinary Toolkit in my Mac ( operate system 10.4, JDK 1.5).
Problem:
Just run the ConverterFrame and encode a file then decode it, but I find
some information of the file was lost, such like: the code of a program, a
preview picture, the background color...(I think maybe lost the metadata)
The MacBinary Toolkit includes several implementations of the central
FileForker class. They work on different platforms, providing different
levels of compliance. The pure Java implementations provide no access to
a
Mac file's real resource-fork or metadata. See the "imps.html" doc that
came with the MacBinary Toolkit download, or this online page:
<http://amug.org/~glguerin/sw/macbinary/imps.html>
The chosen FileForker implementation determines what the other parts of
the
MacBinary Toolkit will be able to do. There is an automatic choice, but
it
requires the correct jars in the classpath, otherwise it won't find the
full-featured MacOSXForker, and will end up using a Java-only PlainForker
or GenericForker. See this section in particular:
<http://amug.org/~glguerin/sw/macbinary/imps.html#use-macosx-jni>
To diagnose the problem, please provide more information.
First, how did you run ConverterFrame? If it was from a command-line,
exactly what command line did you enter? If run some other way, what was
it?
Second, when ConverterFrame runs it uses the automatic choice of
FileForker, and displays it in a smaller text size at the bottom of its
window, as a fully qualified class name. You should look there and then
find the name in the classes described in "imps.html".
PS: For the appleDouble, the "._" file looks include the resource and meta
data, but the "._" file made by Mac finder, is there any methods that made
the "._" file by myself?
The Finder doesn't create or write the "._" files: the OS itself does it.
If you use any of the OS APIs for resource-forks or metadata, and the
target file resides on a file-system that lacks native resource-fork or
metadata support, then a "._" file will be created to hold the data. The
API is doing this, not the Finder.
The "._" file only exists on file-systems that lack native resource-fork
or
metadata support. It will be ignored on HFS-family file-systems, which
have resource-fork and metadata support.
-- GG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden
This email sent to email@hidden