How to associate one or more content types based on something other than filename (URL protocol++) [message #327407] |
Thu, 17 April 2008 20:41 |
Eclipse User |
|
|
|
Originally posted by: none.ibm.com
Imagine I have a WebDAV server or something and a "file" I'd like to open
at:
webdav://server.com/path1/path2/foo
The "foo" filename is completely meaningless and doesn't tell me its content
type, but a HEAD call to the server would return the mime-type, which could
be converted to a content-type easily.
How do I hook into:
Platform.getContentTypeManager().findContentTypeFor(String) //(In this
case, string is a URL)
....so that when the String begins with "webdav:" I can provide some helper
that connects to the server and discovers the content type the right way and
returns it to the ContentTypeManager? The only hack/workaround I see is to
provide *lots* of content describers, all of which have to start parsing the
file contents because the filename/URL isn't even available to the
describer.
|
|
|
Powered by
FUDForum. Page generated in 0.03174 seconds