|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.web3d.net.content.VRMLFileNameMap
An implementation of a file name mapping for handling VRML file types.
When asked for a .wrl file it will return model/vrml. For the
reverse mapping it will handle both the old and new types
This filename mapping must be registered with the URI class by the user in order to work. You can use the following code to do this:
import org.ietf.uri.URI;
import org.ietf.uri.FileNameMap;
...
FileNameMap fn_map = URI.getFileNameMap();
if(!(fn_map instanceof VRMLFileNameMap)) {
fn_map = new VRMLFileNameMap(fn_map);
URI.setFileNameMap(fn_map);
}
| Constructor Summary | |
VRMLFileNameMap()
Create a default filename map that does not delegate to any other map if we can't resolve it. |
|
VRMLFileNameMap(org.ietf.uri.FileNameMap map)
Create a filename map that will delegate to the given map if we cannot resolve the name locally. |
|
| Method Summary | |
java.lang.String |
getContentTypeFor(java.lang.String filename)
Fetch the content type for the given file name. |
java.lang.String |
getFileExtension(java.lang.String mimetype)
Get the standardised extension used for the given MIME type. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public VRMLFileNameMap()
public VRMLFileNameMap(org.ietf.uri.FileNameMap map)
map - The map to delegate to| Method Detail |
public java.lang.String getContentTypeFor(java.lang.String filename)
getContentTypeFor in interface java.net.FileNameMapfilename - The name of the file to check
public java.lang.String getFileExtension(java.lang.String mimetype)
FileNameMap that only supplies the opposite method.
getFileExtension in interface org.ietf.uri.FileNameMapmimetype - The mime type to check for
null if it cannot be resolved
|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||