I believe that the @Get
Annotations look up the method in your Application's MetadataService
object, using a 'file extension'. See JavaDoc of this class (addCommonExtensions()
) for the list of 'file extensions' supported by default.
As a default catch all media type neither application/octet-stream nor it's compressed version have a default mapping. however you are also able to add as many custom mappings and MediaType
instances as you would like. I would usually do this as part of my Application set-up, for example:
public Application(final Context context)
{
super(context);
getMetadataService().addExtension("html", MediaType.TEXT_HTML, true);
}
For Completeness: If you are attempting to Download pre-generated files from Disc you may also be interested in looking at using the Directory class.