Back to project page GenericServer.
The source code is released under:
GNU General Public License
If you think the Android project GenericServer listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.davecoss.android.genericserver; /* www. ja va2 s . c o m*/ public class FileReply extends StreamReply { protected UserFile.FileType filetype = UserFile.FileType.TEXT; public String get_content_type() { if (filetype == UserFile.FileType.JPEG) return "Content-type: image/jpeg"; else if (filetype == UserFile.FileType.HTML) return "Content-type: text/html"; else if (filetype == UserFile.FileType.JAVASCRIPT) return "Content-type: text/javascript"; else if (filetype == UserFile.FileType.CSS) return "Content-type: text/css"; return "Content-type: text/plain"; } public void set_file_type(UserFile.FileType type) { this.filetype = type; } }