8039362: Read content-types.properties as a resource
authorchegar
Tue, 15 Apr 2014 11:24:42 +0100
changeset 23886 6cb6ad1e208f
parent 23885 27c54417e228
child 23887 7b2fb8d5f6be
8039362: Read content-types.properties as a resource Reviewed-by: erikj, alanb, mchung
jdk/make/CopyFiles.gmk
jdk/make/CopyIntoClasses.gmk
jdk/make/profile-includes.txt
jdk/src/macosx/lib/content-types.properties
jdk/src/share/classes/sun/net/www/MimeTable.java
jdk/src/solaris/classes/sun/net/www/content-types.properties
jdk/src/solaris/lib/content-types.properties
jdk/src/windows/classes/sun/net/www/content-types.properties
jdk/src/windows/lib/content-types.properties
--- a/jdk/make/CopyFiles.gmk	Tue Apr 15 09:23:07 2014 +0200
+++ b/jdk/make/CopyFiles.gmk	Tue Apr 15 11:24:42 2014 +0100
@@ -158,15 +158,6 @@
 
 ##########################################################################################
 
-CONTENT_TYPES_SRC = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib
-
-$(LIBDIR)/content-types.properties: $(CONTENT_TYPES_SRC)/content-types.properties
-	$(call install-file)
-
-COPY_FILES += $(LIBDIR)/content-types.properties
-
-##########################################################################################
-
 CALENDARS_SRC := $(JDK_TOPDIR)/src/share/lib
 
 $(LIBDIR)/calendars.properties: $(CALENDARS_SRC)/calendars.properties
--- a/jdk/make/CopyIntoClasses.gmk	Tue Apr 15 09:23:07 2014 +0200
+++ b/jdk/make/CopyIntoClasses.gmk	Tue Apr 15 11:24:42 2014 +0100
@@ -26,7 +26,7 @@
 # Copy icu and _dict files used by the text break iterator
 
 COPY_PATTERNS := .icu _dict .dat _options .js aliasmap .spp .wav .css \
-    .png .gif .xml .dtd .txt oqlhelp.html
+    .png .gif .xml .dtd .txt oqlhelp.html content-types.properties
 
 # These directories should not be copied at all
 EXCLUDES += \
--- a/jdk/make/profile-includes.txt	Tue Apr 15 09:23:07 2014 +0200
+++ b/jdk/make/profile-includes.txt	Tue Apr 15 11:24:42 2014 +0100
@@ -56,7 +56,6 @@
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/server/Xusage.txt \
     calendars.properties \
     classlist \
-    content-types.properties \
     currency.data \
     ext/localedata.jar \
     ext/meta-index \
--- a/jdk/src/macosx/lib/content-types.properties	Tue Apr 15 09:23:07 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,276 +0,0 @@
-#sun.net.www MIME content-types table
-#
-# Property fields:
-#
-#   <description> ::= 'description' '=' <descriptive string>
-#    <extensions> ::= 'file_extensions' '=' <comma-delimited list, include '.'>
-#         <image> ::= 'icon' '=' <filename of icon image>
-#        <action> ::= 'browser' | 'application' | 'save' | 'unknown'
-#   <application> ::= 'application' '=' <command line template>
-#
-
-#
-# The "we don't know anything about this data" type(s).
-# Used internally to mark unrecognized types.
-#
-content/unknown: description=Unknown Content
-unknown/unknown: description=Unknown Data Type
-
-#
-# The template we should use for temporary files when launching an application
-# to view a document of given type.
-#
-temp.file.template: /tmp/%s
-
-#
-# The "real" types.
-#
-application/octet-stream: \
-	description=Generic Binary Stream;\
-	file_extensions=.saveme,.dump,.hqx,.arc,.o,.a,.bin,.exe,.z,.gz
-
-application/oda: \
-	description=ODA Document;\
-	file_extensions=.oda
-
-application/pdf: \
-	description=Adobe PDF Format;\
-	file_extensions=.pdf
-
-application/postscript: \
-	description=Postscript File;\
-	file_extensions=.eps,.ai,.ps;\
-	icon=ps;\
-	action=application;\
-	application=imagetool %s
-
-application/x-dvi: \
-	description=TeX DVI File;\
-	file_extensions=.dvi;\
-	action=application;\
-	application=xdvi %s
-
-application/x-hdf: \
-	description=Hierarchical Data Format;\
-	file_extensions=.hdf;\
-	action=save
-
-application/x-latex: \
-	description=LaTeX Source;\
-	file_extensions=.latex
-
-application/x-netcdf: \
-	description=Unidata netCDF Data Format;\
-	file_extensions=.nc,.cdf;\
-	action=save
-
-application/x-tex: \
-	description=TeX Source;\
-	file_extensions=.tex
-
-application/x-texinfo: \
-	description=Gnu Texinfo;\
-	file_extensions=.texinfo,.texi
-
-application/x-troff: \
-	description=Troff Source;\
-	file_extensions=.t,.tr,.roff;\
-	action=application;\
-	application=xterm -title troff -e sh -c \"nroff %s | col | more -w\"
-
-application/x-troff-man: \
-	description=Troff Manpage Source;\
-	file_extensions=.man;\
-	action=application;\
-	application=xterm -title troff -e sh -c \"nroff -man %s | col | more -w\"
-
-application/x-troff-me: \
-	description=Troff ME Macros;\
-	file_extensions=.me;\
-	action=application;\
-	application=xterm -title troff -e sh -c \"nroff -me %s | col | more -w\"
-
-application/x-troff-ms: \
-	description=Troff MS Macros;\
-	file_extensions=.ms;\
-	action=application;\
-	application=xterm -title troff -e sh -c \"nroff -ms %s | col | more -w\"
-
-application/x-wais-source: \
-	description=Wais Source;\
-	file_extensions=.src,.wsrc
-
-application/zip: \
-	description=Zip File;\
-	file_extensions=.zip;\
-	icon=zip;\
-	action=save
-
-application/x-bcpio: \
-	description=Old Binary CPIO Archive;\
-	file_extensions=.bcpio; action=save
-
-application/x-cpio: \
-	description=Unix CPIO Archive;\
-	file_extensions=.cpio; action=save
-
-application/x-gtar: \
-	description=Gnu Tar Archive;\
-	file_extensions=.gtar;\
-	icon=tar;\
-	action=save
-
-application/x-shar: \
-	description=Shell Archive;\
-	file_extensions=.sh,.shar;\
-	action=save
-
-application/x-sv4cpio: \
-	description=SVR4 CPIO Archive;\
-	file_extensions=.sv4cpio; action=save
-
-application/x-sv4crc: \
-	description=SVR4 CPIO with CRC;\
-	file_extensions=.sv4crc; action=save
-
-application/x-tar: \
-	description=Tar Archive;\
-	file_extensions=.tar;\
-	icon=tar;\
-	action=save
-
-application/x-ustar: \
-	description=US Tar Archive;\
-	file_extensions=.ustar;\
-	action=save
-
-audio/basic: \
-	description=Basic Audio;\
-	file_extensions=.snd,.au;\
-	icon=audio;\
-	action=application;\
-	application=audiotool %s
-
-audio/x-aiff: \
-	description=Audio Interchange Format File;\
-	file_extensions=.aifc,.aif,.aiff;\
-	icon=aiff
-
-audio/x-wav: \
-	description=Wav Audio;\
-	file_extensions=.wav;\
-	icon=wav
-
-image/gif: \
-	description=GIF Image;\
-	file_extensions=.gif;\
-	icon=gif;\
-	action=browser
-
-image/ief: \
-	description=Image Exchange Format;\
-	file_extensions=.ief
-
-image/jpeg: \
-	description=JPEG Image;\
-	file_extensions=.jfif,.jfif-tbnl,.jpe,.jpg,.jpeg;\
-	icon=jpeg;\
-	action=browser;\
-	application=imagetool %s
-
-image/tiff: \
-	description=TIFF Image;\
-	file_extensions=.tif,.tiff;\
-	icon=tiff
-
-image/vnd.fpx: \
-	description=FlashPix Image;\
-	file_extensions=.fpx,.fpix
-
-image/x-cmu-rast: \
-	description=CMU Raster Image;\
-	file_extensions=.ras
-
-image/x-portable-anymap: \
-	description=PBM Anymap Format;\
-	file_extensions=.pnm
-
-image/x-portable-bitmap: \
-	description=PBM Bitmap Format;\
-	file_extensions=.pbm
-
-image/x-portable-graymap: \
-	description=PBM Graymap Format;\
-	file_extensions=.pgm
-
-image/x-portable-pixmap: \
-	description=PBM Pixmap Format;\
-	file_extensions=.ppm
-
-image/x-rgb: \
-	description=RGB Image;\
-	file_extensions=.rgb
-
-image/x-xbitmap: \
-	description=X Bitmap Image;\
-	file_extensions=.xbm,.xpm
-
-image/x-xwindowdump: \
-	description=X Window Dump Image;\
-	file_extensions=.xwd
-
-image/png: \
-	description=PNG Image;\
-	file_extensions=.png;\
-	icon=png;\
-	action=browser
-
-text/html: \
-	description=HTML Document;\
-	file_extensions=.htm,.html;\
-	icon=html
-
-text/plain: \
-	description=Plain Text;\
-	file_extensions=.text,.c,.cc,.c++,.h,.pl,.txt,.java,.el;\
-	icon=text;\
-	action=browser
-
-text/tab-separated-values: \
-	description=Tab Separated Values Text;\
-	file_extensions=.tsv
-
-text/x-setext: \
-	description=Structure Enhanced Text;\
-	file_extensions=.etx
-
-video/mpeg: \
-	description=MPEG Video Clip;\
-	file_extensions=.mpg,.mpe,.mpeg;\
-	icon=mpeg;\
-	action=application;\
-	application=mpeg_play %s
-
-video/quicktime: \
-	description=QuickTime Video Clip;\
-	file_extensions=.mov,.qt
-
-application/x-troff-msvideo: \
-	description=AVI Video;\
-	file_extensions=.avi;\
-	icon=avi
-
-video/x-sgi-movie: \
-	description=SGI Movie;\
-	file_extensions=.movie,.mv
-
-message/rfc822: \
-	description=Internet Email Message;\
-	file_extensions=.mime
-
-application/xml: \
-	description=XML document;\
-	file_extensions=.xml
-
-
-
--- a/jdk/src/share/classes/sun/net/www/MimeTable.java	Tue Apr 15 09:23:07 2014 +0200
+++ b/jdk/src/share/classes/sun/net/www/MimeTable.java	Tue Apr 15 11:24:42 2014 +0100
@@ -225,39 +225,28 @@
     public synchronized void load() {
         Properties entries = new Properties();
         File file = null;
-        try {
-            InputStream is;
-            // First try to load the user-specific table, if it exists
-            String userTablePath =
-                System.getProperty("content.types.user.table");
-            if (userTablePath != null) {
-                file = new File(userTablePath);
-                if (!file.exists()) {
-                    // No user-table, try to load the default built-in table.
-                    file = new File(System.getProperty("java.home") +
-                                    File.separator +
-                                    "lib" +
-                                    File.separator +
-                                    "content-types.properties");
-                }
+        InputStream in;
+
+        // First try to load the user-specific table, if it exists
+        String userTablePath = System.getProperty("content.types.user.table");
+        if (userTablePath != null && (file = new File(userTablePath)).exists()) {
+            try {
+                in = new FileInputStream(file);
+            } catch (FileNotFoundException e) {
+                System.err.println("Warning: " + file.getPath()
+                                   + " mime table not found.");
+                return;
             }
-            else {
-                // No user table, try to load the default built-in table.
-                file = new File(System.getProperty("java.home") +
-                                File.separator +
-                                "lib" +
-                                File.separator +
-                                "content-types.properties");
-            }
+        } else {
+            in = MimeTable.class.getResourceAsStream("content-types.properties");
+            if (in == null)
+                throw new InternalError("default mime table not found");
+        }
 
-            is = new BufferedInputStream(new FileInputStream(file));
-            entries.load(is);
-            is.close();
-        }
-        catch (IOException e) {
-            System.err.println("Warning: default mime table not found: " +
-                               file.getPath());
-            return;
+        try (BufferedInputStream bin = new BufferedInputStream(in)) {
+            entries.load(bin);
+        } catch (IOException e) {
+            System.err.println("Warning: " + e.getMessage());
         }
         parse(entries);
     }
@@ -380,18 +369,6 @@
         return MimeEntry.UNKNOWN;
     }
 
-    public synchronized boolean save(String filename) {
-        if (filename == null) {
-            filename = System.getProperty("user.home" +
-                                          File.separator +
-                                          "lib" +
-                                          File.separator +
-                                          "content-types.properties");
-        }
-
-        return saveAsProperties(new File(filename));
-    }
-
     public Properties getAsProperties() {
         Properties properties = new Properties();
         Enumeration<MimeEntry> e = elements();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/solaris/classes/sun/net/www/content-types.properties	Tue Apr 15 11:24:42 2014 +0100
@@ -0,0 +1,280 @@
+#sun.net.www MIME content-types table
+#
+# Property fields:
+#
+#   <description> ::= 'description' '=' <descriptive string>
+#    <extensions> ::= 'file_extensions' '=' <comma-delimited list, include '.'>
+#         <image> ::= 'icon' '=' <filename of icon image>
+#        <action> ::= 'browser' | 'application' | 'save' | 'unknown'
+#   <application> ::= 'application' '=' <command line template>
+#
+
+#
+# The "we don't know anything about this data" type(s).
+# Used internally to mark unrecognized types.
+#
+content/unknown: description=Unknown Content
+unknown/unknown: description=Unknown Data Type
+
+#
+# The template we should use for temporary files when launching an application
+# to view a document of given type.
+#
+temp.file.template: /tmp/%s
+
+#
+# The "real" types.
+#
+application/octet-stream: \
+	description=Generic Binary Stream;\
+	file_extensions=.saveme,.dump,.hqx,.arc,.o,.a,.bin,.exe,.z,.gz
+
+application/oda: \
+	description=ODA Document;\
+	file_extensions=.oda
+
+application/pdf: \
+	description=Adobe PDF Format;\
+	file_extensions=.pdf
+
+application/postscript: \
+	description=Postscript File;\
+	file_extensions=.eps,.ai,.ps;\
+	icon=ps;\
+	action=application;\
+	application=imagetool %s
+
+application/x-dvi: \
+	description=TeX DVI File;\
+	file_extensions=.dvi;\
+	action=application;\
+	application=xdvi %s
+
+application/x-hdf: \
+	description=Hierarchical Data Format;\
+	file_extensions=.hdf;\
+	action=save
+
+application/x-latex: \
+	description=LaTeX Source;\
+	file_extensions=.latex
+
+application/x-netcdf: \
+	description=Unidata netCDF Data Format;\
+	file_extensions=.nc,.cdf;\
+	action=save
+
+application/x-tex: \
+	description=TeX Source;\
+	file_extensions=.tex
+
+application/x-texinfo: \
+	description=Gnu Texinfo;\
+	file_extensions=.texinfo,.texi
+
+application/x-troff: \
+	description=Troff Source;\
+	file_extensions=.t,.tr,.roff;\
+	action=application;\
+	application=xterm -title troff -e sh -c \"nroff %s | col | more -w\"
+
+application/x-troff-man: \
+	description=Troff Manpage Source;\
+	file_extensions=.man;\
+	action=application;\
+	application=xterm -title troff -e sh -c \"nroff -man %s | col | more -w\"
+
+application/x-troff-me: \
+	description=Troff ME Macros;\
+	file_extensions=.me;\
+	action=application;\
+	application=xterm -title troff -e sh -c \"nroff -me %s | col | more -w\"
+
+application/x-troff-ms: \
+	description=Troff MS Macros;\
+	file_extensions=.ms;\
+	action=application;\
+	application=xterm -title troff -e sh -c \"nroff -ms %s | col | more -w\"
+
+application/x-wais-source: \
+	description=Wais Source;\
+	file_extensions=.src,.wsrc
+
+application/zip: \
+	description=Zip File;\
+	file_extensions=.zip;\
+	icon=zip;\
+	action=save
+
+application/x-bcpio: \
+	description=Old Binary CPIO Archive;\
+	file_extensions=.bcpio; action=save
+
+application/x-cpio: \
+	description=Unix CPIO Archive;\
+	file_extensions=.cpio; action=save
+
+application/x-gtar: \
+	description=Gnu Tar Archive;\
+	file_extensions=.gtar;\
+	icon=tar;\
+	action=save
+
+application/x-shar: \
+	description=Shell Archive;\
+	file_extensions=.sh,.shar;\
+	action=save
+
+application/x-sv4cpio: \
+	description=SVR4 CPIO Archive;\
+	file_extensions=.sv4cpio; action=save
+
+application/x-sv4crc: \
+	description=SVR4 CPIO with CRC;\
+	file_extensions=.sv4crc; action=save
+
+application/x-tar: \
+	description=Tar Archive;\
+	file_extensions=.tar;\
+	icon=tar;\
+	action=save
+
+application/x-ustar: \
+	description=US Tar Archive;\
+	file_extensions=.ustar;\
+	action=save
+
+audio/basic: \
+	description=Basic Audio;\
+	file_extensions=.snd,.au;\
+	icon=audio;\
+	action=application;\
+	application=audiotool %s
+
+audio/x-aiff: \
+	description=Audio Interchange Format File;\
+	file_extensions=.aifc,.aif,.aiff;\
+	icon=aiff
+
+audio/x-wav: \
+	description=Wav Audio;\
+	file_extensions=.wav;\
+	icon=wav
+
+image/gif: \
+	description=GIF Image;\
+	file_extensions=.gif;\
+	icon=gif;\
+	action=browser
+
+image/ief: \
+	description=Image Exchange Format;\
+	file_extensions=.ief
+
+image/jpeg: \
+	description=JPEG Image;\
+	file_extensions=.jfif,.jfif-tbnl,.jpe,.jpg,.jpeg;\
+	icon=jpeg;\
+	action=browser;\
+	application=imagetool %s
+
+image/tiff: \
+	description=TIFF Image;\
+	file_extensions=.tif,.tiff;\
+	icon=tiff
+
+image/vnd.fpx: \
+	description=FlashPix Image;\
+	file_extensions=.fpx,.fpix
+
+image/x-cmu-rast: \
+	description=CMU Raster Image;\
+	file_extensions=.ras
+
+image/x-portable-anymap: \
+	description=PBM Anymap Format;\
+	file_extensions=.pnm
+
+image/x-portable-bitmap: \
+	description=PBM Bitmap Format;\
+	file_extensions=.pbm
+
+image/x-portable-graymap: \
+	description=PBM Graymap Format;\
+	file_extensions=.pgm
+
+image/x-portable-pixmap: \
+	description=PBM Pixmap Format;\
+	file_extensions=.ppm
+
+image/x-rgb: \
+	description=RGB Image;\
+	file_extensions=.rgb
+
+image/x-xbitmap: \
+	description=X Bitmap Image;\
+	file_extensions=.xbm,.xpm
+
+image/x-xwindowdump: \
+	description=X Window Dump Image;\
+	file_extensions=.xwd
+
+image/png: \
+	description=PNG Image;\
+	file_extensions=.png;\
+	icon=png;\
+	action=browser
+
+image/bmp: \
+	description=Bitmap Image;\
+	file_extensions=.bmp;
+
+text/html: \
+	description=HTML Document;\
+	file_extensions=.htm,.html;\
+	icon=html
+
+text/plain: \
+	description=Plain Text;\
+	file_extensions=.text,.c,.cc,.c++,.h,.pl,.txt,.java,.el;\
+	icon=text;\
+	action=browser
+
+text/tab-separated-values: \
+	description=Tab Separated Values Text;\
+	file_extensions=.tsv
+
+text/x-setext: \
+	description=Structure Enhanced Text;\
+	file_extensions=.etx
+
+video/mpeg: \
+	description=MPEG Video Clip;\
+	file_extensions=.mpg,.mpe,.mpeg;\
+	icon=mpeg;\
+	action=application;\
+	application=mpeg_play %s
+
+video/quicktime: \
+	description=QuickTime Video Clip;\
+	file_extensions=.mov,.qt
+
+application/x-troff-msvideo: \
+	description=AVI Video;\
+	file_extensions=.avi;\
+	icon=avi
+
+video/x-sgi-movie: \
+	description=SGI Movie;\
+	file_extensions=.movie,.mv
+
+message/rfc822: \
+	description=Internet Email Message;\
+	file_extensions=.mime
+
+application/xml: \
+	description=XML document;\
+	file_extensions=.xml
+
+
+
--- a/jdk/src/solaris/lib/content-types.properties	Tue Apr 15 09:23:07 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,280 +0,0 @@
-#sun.net.www MIME content-types table
-#
-# Property fields:
-#
-#   <description> ::= 'description' '=' <descriptive string>
-#    <extensions> ::= 'file_extensions' '=' <comma-delimited list, include '.'>
-#         <image> ::= 'icon' '=' <filename of icon image>
-#        <action> ::= 'browser' | 'application' | 'save' | 'unknown'
-#   <application> ::= 'application' '=' <command line template>
-#
-
-#
-# The "we don't know anything about this data" type(s).
-# Used internally to mark unrecognized types.
-#
-content/unknown: description=Unknown Content
-unknown/unknown: description=Unknown Data Type
-
-#
-# The template we should use for temporary files when launching an application
-# to view a document of given type.
-#
-temp.file.template: /tmp/%s
-
-#
-# The "real" types.
-#
-application/octet-stream: \
-	description=Generic Binary Stream;\
-	file_extensions=.saveme,.dump,.hqx,.arc,.o,.a,.bin,.exe,.z,.gz
-
-application/oda: \
-	description=ODA Document;\
-	file_extensions=.oda
-
-application/pdf: \
-	description=Adobe PDF Format;\
-	file_extensions=.pdf
-
-application/postscript: \
-	description=Postscript File;\
-	file_extensions=.eps,.ai,.ps;\
-	icon=ps;\
-	action=application;\
-	application=imagetool %s
-
-application/x-dvi: \
-	description=TeX DVI File;\
-	file_extensions=.dvi;\
-	action=application;\
-	application=xdvi %s
-
-application/x-hdf: \
-	description=Hierarchical Data Format;\
-	file_extensions=.hdf;\
-	action=save
-
-application/x-latex: \
-	description=LaTeX Source;\
-	file_extensions=.latex
-
-application/x-netcdf: \
-	description=Unidata netCDF Data Format;\
-	file_extensions=.nc,.cdf;\
-	action=save
-
-application/x-tex: \
-	description=TeX Source;\
-	file_extensions=.tex
-
-application/x-texinfo: \
-	description=Gnu Texinfo;\
-	file_extensions=.texinfo,.texi
-
-application/x-troff: \
-	description=Troff Source;\
-	file_extensions=.t,.tr,.roff;\
-	action=application;\
-	application=xterm -title troff -e sh -c \"nroff %s | col | more -w\"
-
-application/x-troff-man: \
-	description=Troff Manpage Source;\
-	file_extensions=.man;\
-	action=application;\
-	application=xterm -title troff -e sh -c \"nroff -man %s | col | more -w\"
-
-application/x-troff-me: \
-	description=Troff ME Macros;\
-	file_extensions=.me;\
-	action=application;\
-	application=xterm -title troff -e sh -c \"nroff -me %s | col | more -w\"
-
-application/x-troff-ms: \
-	description=Troff MS Macros;\
-	file_extensions=.ms;\
-	action=application;\
-	application=xterm -title troff -e sh -c \"nroff -ms %s | col | more -w\"
-
-application/x-wais-source: \
-	description=Wais Source;\
-	file_extensions=.src,.wsrc
-
-application/zip: \
-	description=Zip File;\
-	file_extensions=.zip;\
-	icon=zip;\
-	action=save
-
-application/x-bcpio: \
-	description=Old Binary CPIO Archive;\
-	file_extensions=.bcpio; action=save
-
-application/x-cpio: \
-	description=Unix CPIO Archive;\
-	file_extensions=.cpio; action=save
-
-application/x-gtar: \
-	description=Gnu Tar Archive;\
-	file_extensions=.gtar;\
-	icon=tar;\
-	action=save
-
-application/x-shar: \
-	description=Shell Archive;\
-	file_extensions=.sh,.shar;\
-	action=save
-
-application/x-sv4cpio: \
-	description=SVR4 CPIO Archive;\
-	file_extensions=.sv4cpio; action=save
-
-application/x-sv4crc: \
-	description=SVR4 CPIO with CRC;\
-	file_extensions=.sv4crc; action=save
-
-application/x-tar: \
-	description=Tar Archive;\
-	file_extensions=.tar;\
-	icon=tar;\
-	action=save
-
-application/x-ustar: \
-	description=US Tar Archive;\
-	file_extensions=.ustar;\
-	action=save
-
-audio/basic: \
-	description=Basic Audio;\
-	file_extensions=.snd,.au;\
-	icon=audio;\
-	action=application;\
-	application=audiotool %s
-
-audio/x-aiff: \
-	description=Audio Interchange Format File;\
-	file_extensions=.aifc,.aif,.aiff;\
-	icon=aiff
-
-audio/x-wav: \
-	description=Wav Audio;\
-	file_extensions=.wav;\
-	icon=wav
-
-image/gif: \
-	description=GIF Image;\
-	file_extensions=.gif;\
-	icon=gif;\
-	action=browser
-
-image/ief: \
-	description=Image Exchange Format;\
-	file_extensions=.ief
-
-image/jpeg: \
-	description=JPEG Image;\
-	file_extensions=.jfif,.jfif-tbnl,.jpe,.jpg,.jpeg;\
-	icon=jpeg;\
-	action=browser;\
-	application=imagetool %s
-
-image/tiff: \
-	description=TIFF Image;\
-	file_extensions=.tif,.tiff;\
-	icon=tiff
-
-image/vnd.fpx: \
-	description=FlashPix Image;\
-	file_extensions=.fpx,.fpix
-
-image/x-cmu-rast: \
-	description=CMU Raster Image;\
-	file_extensions=.ras
-
-image/x-portable-anymap: \
-	description=PBM Anymap Format;\
-	file_extensions=.pnm
-
-image/x-portable-bitmap: \
-	description=PBM Bitmap Format;\
-	file_extensions=.pbm
-
-image/x-portable-graymap: \
-	description=PBM Graymap Format;\
-	file_extensions=.pgm
-
-image/x-portable-pixmap: \
-	description=PBM Pixmap Format;\
-	file_extensions=.ppm
-
-image/x-rgb: \
-	description=RGB Image;\
-	file_extensions=.rgb
-
-image/x-xbitmap: \
-	description=X Bitmap Image;\
-	file_extensions=.xbm,.xpm
-
-image/x-xwindowdump: \
-	description=X Window Dump Image;\
-	file_extensions=.xwd
-
-image/png: \
-	description=PNG Image;\
-	file_extensions=.png;\
-	icon=png;\
-	action=browser
-
-image/bmp: \
-	description=Bitmap Image;\
-	file_extensions=.bmp;
-
-text/html: \
-	description=HTML Document;\
-	file_extensions=.htm,.html;\
-	icon=html
-
-text/plain: \
-	description=Plain Text;\
-	file_extensions=.text,.c,.cc,.c++,.h,.pl,.txt,.java,.el;\
-	icon=text;\
-	action=browser
-
-text/tab-separated-values: \
-	description=Tab Separated Values Text;\
-	file_extensions=.tsv
-
-text/x-setext: \
-	description=Structure Enhanced Text;\
-	file_extensions=.etx
-
-video/mpeg: \
-	description=MPEG Video Clip;\
-	file_extensions=.mpg,.mpe,.mpeg;\
-	icon=mpeg;\
-	action=application;\
-	application=mpeg_play %s
-
-video/quicktime: \
-	description=QuickTime Video Clip;\
-	file_extensions=.mov,.qt
-
-application/x-troff-msvideo: \
-	description=AVI Video;\
-	file_extensions=.avi;\
-	icon=avi
-
-video/x-sgi-movie: \
-	description=SGI Movie;\
-	file_extensions=.movie,.mv
-
-message/rfc822: \
-	description=Internet Email Message;\
-	file_extensions=.mime
-
-application/xml: \
-	description=XML document;\
-	file_extensions=.xml
-
-
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/windows/classes/sun/net/www/content-types.properties	Tue Apr 15 11:24:42 2014 +0100
@@ -0,0 +1,276 @@
+#sun.net.www MIME content-types table
+#
+# Property fields:
+#
+#   <description> ::= 'description' '=' <descriptive string>
+#    <extensions> ::= 'file_extensions' '=' <comma-delimited list, include '.'>
+#         <image> ::= 'icon' '=' <filename of icon image>
+#        <action> ::= 'browser' | 'application' | 'save' | 'unknown'
+#   <application> ::= 'application' '=' <command line template>
+#
+
+#
+# The "we don't know anything about this data" type(s).
+# Used internally to mark unrecognized types.
+#
+content/unknown: description=Unknown Content
+unknown/unknown: description=Unknown Data Type
+
+#
+# The template we should use for temporary files when launching an application
+# to view a document of given type.
+#
+temp.file.template: c:\\temp\\%s
+
+#
+# The "real" types.
+#
+application/octet-stream: \
+	description=Generic Binary Stream;\
+	file_extensions=.saveme,.dump,.hqx,.arc,.obj,.lib,.bin,.exe,.zip,.gz
+
+application/oda: \
+	description=ODA Document;\
+	file_extensions=.oda
+
+application/pdf: \
+	description=Adobe PDF Format;\
+	file_extensions=.pdf
+
+application/postscript: \
+	description=Postscript File;\
+	file_extensions=.eps,.ai,.ps;\
+	icon=ps
+
+application/rtf: \
+	description=Wordpad Document;\
+	file_extensions=.rtf;\
+	action=application;\
+	application=wordpad.exe %s
+
+application/x-dvi: \
+	description=TeX DVI File;\
+	file_extensions=.dvi
+
+application/x-hdf: \
+	description=Hierarchical Data Format;\
+	file_extensions=.hdf;\
+	action=save
+
+application/x-latex: \
+	description=LaTeX Source;\
+	file_extensions=.latex
+
+application/x-netcdf: \
+	description=Unidata netCDF Data Format;\
+	file_extensions=.nc,.cdf;\
+	action=save
+
+application/x-tex: \
+	description=TeX Source;\
+	file_extensions=.tex
+
+application/x-texinfo: \
+	description=Gnu Texinfo;\
+	file_extensions=.texinfo,.texi
+
+application/x-troff: \
+	description=Troff Source;\
+	file_extensions=.t,.tr,.roff
+
+application/x-troff-man: \
+	description=Troff Manpage Source;\
+	file_extensions=.man
+
+application/x-troff-me: \
+	description=Troff ME Macros;\
+	file_extensions=.me
+
+application/x-troff-ms: \
+	description=Troff MS Macros;\
+	file_extensions=.ms
+
+application/x-wais-source: \
+	description=Wais Source;\
+	file_extensions=.src,.wsrc
+
+application/zip: \
+	description=Zip File;\
+	file_extensions=.zip;\
+	icon=zip;\
+	action=save
+
+application/x-bcpio: \
+	description=Old Binary CPIO Archive;\
+	file_extensions=.bcpio;\
+	action=save
+
+application/x-cpio: \
+	description=Unix CPIO Archive;\
+	file_extensions=.cpio;\
+	action=save
+
+application/x-gtar: \
+	description=Gnu Tar Archive;\
+	file_extensions=.gtar;\
+	icon=tar;\
+	action=save
+
+application/x-shar: \
+	description=Shell Archive;\
+	file_extensions=.sh,.shar;\
+	action=save
+
+application/x-sv4cpio: \
+	description=SVR4 CPIO Archive;\
+	file_extensions=.sv4cpio;\
+	action=save
+
+application/x-sv4crc: \
+	description=SVR4 CPIO with CRC;\
+	file_extensions=.sv4crc;\
+	action=save
+
+application/x-tar: \
+	description=Tar Archive;\
+	file_extensions=.tar;\
+	icon=tar;\
+	action=save
+
+application/x-ustar: \
+	description=US Tar Archive;\
+	file_extensions=.ustar;\
+	action=save
+
+audio/basic: \
+	description=Basic Audio;\
+	file_extensions=.snd,.au;\
+	icon=audio
+
+audio/x-aiff: \
+	description=Audio Interchange Format File;\
+	file_extensions=.aifc,.aif,.aiff;\
+	icon=aiff
+
+audio/x-wav: \
+	description=Wav Audio;\
+	file_extensions=.wav;\
+	icon=wav;\
+	action=application;\
+	application=mplayer.exe %s
+
+image/gif: \
+	description=GIF Image;\
+	file_extensions=.gif;\
+	icon=gif;\
+	action=browser
+
+image/ief: \
+	description=Image Exchange Format;\
+	file_extensions=.ief
+
+image/jpeg: \
+	description=JPEG Image;\
+	file_extensions=.jfif,.jfif-tbnl,.jpe,.jpg,.jpeg;\
+	icon=jpeg;\
+	action=browser
+
+image/tiff: \
+	description=TIFF Image;\
+	file_extensions=.tif,.tiff;\
+	icon=tiff
+
+image/vnd.fpx: \
+	description=FlashPix Image;\
+	file_extensions=.fpx,.fpix
+
+image/x-cmu-rast: \
+	description=CMU Raster Image;\
+	file_extensions=.ras
+
+image/x-portable-anymap: \
+	description=PBM Anymap Image;\
+	file_extensions=.pnm
+
+image/x-portable-bitmap: \
+	description=PBM Bitmap Image;\
+	file_extensions=.pbm
+
+image/x-portable-graymap: \
+	description=PBM Graymap Image;\
+	file_extensions=.pgm
+
+image/x-portable-pixmap: \
+	description=PBM Pixmap Image;\
+	file_extensions=.ppm
+
+image/x-rgb: \
+	description=RGB Image;\
+	file_extensions=.rgb
+
+image/x-xbitmap: \
+	description=X Bitmap Image;\
+	file_extensions=.xbm,.xpm
+
+image/x-xwindowdump: \
+	description=X Window Dump Image;\
+	file_extensions=.xwd
+
+image/png: \
+	description=PNG Image;\
+	file_extensions=.png;\
+	icon=png;\
+	action=browser
+
+image/bmp: \
+	description=Bitmap Image;\
+	file_extensions=.bmp;
+
+text/html: \
+	description=HTML Document;\
+	file_extensions=.htm,.html;\
+	icon=html
+
+text/plain: \
+	description=Plain Text;\
+	file_extensions=.text,.c,.cc,.c++,.h,.pl,.txt,.java,.el;\
+	icon=text;\
+	action=browser
+
+text/tab-separated-values: \
+	description=Tab Separated Values Text;\
+	file_extensions=.tsv
+
+text/x-setext: \
+	description=Structure Enhanced Text;\
+	file_extensions=.etx
+
+video/mpeg: \
+	description=MPEG Video Clip;\
+	file_extensions=.mpg,.mpe,.mpeg;\
+	icon=mpeg
+
+video/quicktime: \
+	description=QuickTime Video Clip;\
+	file_extensions=.mov,.qt
+
+application/x-troff-msvideo: \
+	description=AVI Video;\
+	file_extensions=.avi;\
+	icon=avi;\
+	action=application;\
+	application=mplayer.exe %s
+
+video/x-sgi-movie: \
+	description=SGI Movie;\
+	file_extensions=.movie,.mv
+
+message/rfc822: \
+	description=Internet Email Message;\
+	file_extensions=.mime
+
+application/xml: \
+	description=XML document;\
+	file_extensions=.xml
+
+
--- a/jdk/src/windows/lib/content-types.properties	Tue Apr 15 09:23:07 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,276 +0,0 @@
-#sun.net.www MIME content-types table
-#
-# Property fields:
-#
-#   <description> ::= 'description' '=' <descriptive string>
-#    <extensions> ::= 'file_extensions' '=' <comma-delimited list, include '.'>
-#         <image> ::= 'icon' '=' <filename of icon image>
-#        <action> ::= 'browser' | 'application' | 'save' | 'unknown'
-#   <application> ::= 'application' '=' <command line template>
-#
-
-#
-# The "we don't know anything about this data" type(s).
-# Used internally to mark unrecognized types.
-#
-content/unknown: description=Unknown Content
-unknown/unknown: description=Unknown Data Type
-
-#
-# The template we should use for temporary files when launching an application
-# to view a document of given type.
-#
-temp.file.template: c:\\temp\\%s
-
-#
-# The "real" types.
-#
-application/octet-stream: \
-	description=Generic Binary Stream;\
-	file_extensions=.saveme,.dump,.hqx,.arc,.obj,.lib,.bin,.exe,.zip,.gz
-
-application/oda: \
-	description=ODA Document;\
-	file_extensions=.oda
-
-application/pdf: \
-	description=Adobe PDF Format;\
-	file_extensions=.pdf
-
-application/postscript: \
-	description=Postscript File;\
-	file_extensions=.eps,.ai,.ps;\
-	icon=ps
-
-application/rtf: \
-	description=Wordpad Document;\
-	file_extensions=.rtf;\
-	action=application;\
-	application=wordpad.exe %s
-
-application/x-dvi: \
-	description=TeX DVI File;\
-	file_extensions=.dvi
-
-application/x-hdf: \
-	description=Hierarchical Data Format;\
-	file_extensions=.hdf;\
-	action=save
-
-application/x-latex: \
-	description=LaTeX Source;\
-	file_extensions=.latex
-
-application/x-netcdf: \
-	description=Unidata netCDF Data Format;\
-	file_extensions=.nc,.cdf;\
-	action=save
-
-application/x-tex: \
-	description=TeX Source;\
-	file_extensions=.tex
-
-application/x-texinfo: \
-	description=Gnu Texinfo;\
-	file_extensions=.texinfo,.texi
-
-application/x-troff: \
-	description=Troff Source;\
-	file_extensions=.t,.tr,.roff
-
-application/x-troff-man: \
-	description=Troff Manpage Source;\
-	file_extensions=.man
-
-application/x-troff-me: \
-	description=Troff ME Macros;\
-	file_extensions=.me
-
-application/x-troff-ms: \
-	description=Troff MS Macros;\
-	file_extensions=.ms
-
-application/x-wais-source: \
-	description=Wais Source;\
-	file_extensions=.src,.wsrc
-
-application/zip: \
-	description=Zip File;\
-	file_extensions=.zip;\
-	icon=zip;\
-	action=save
-
-application/x-bcpio: \
-	description=Old Binary CPIO Archive;\
-	file_extensions=.bcpio;\
-	action=save
-
-application/x-cpio: \
-	description=Unix CPIO Archive;\
-	file_extensions=.cpio;\
-	action=save
-
-application/x-gtar: \
-	description=Gnu Tar Archive;\
-	file_extensions=.gtar;\
-	icon=tar;\
-	action=save
-
-application/x-shar: \
-	description=Shell Archive;\
-	file_extensions=.sh,.shar;\
-	action=save
-
-application/x-sv4cpio: \
-	description=SVR4 CPIO Archive;\
-	file_extensions=.sv4cpio;\
-	action=save
-
-application/x-sv4crc: \
-	description=SVR4 CPIO with CRC;\
-	file_extensions=.sv4crc;\
-	action=save
-
-application/x-tar: \
-	description=Tar Archive;\
-	file_extensions=.tar;\
-	icon=tar;\
-	action=save
-
-application/x-ustar: \
-	description=US Tar Archive;\
-	file_extensions=.ustar;\
-	action=save
-
-audio/basic: \
-	description=Basic Audio;\
-	file_extensions=.snd,.au;\
-	icon=audio
-
-audio/x-aiff: \
-	description=Audio Interchange Format File;\
-	file_extensions=.aifc,.aif,.aiff;\
-	icon=aiff
-
-audio/x-wav: \
-	description=Wav Audio;\
-	file_extensions=.wav;\
-	icon=wav;\
-	action=application;\
-	application=mplayer.exe %s
-
-image/gif: \
-	description=GIF Image;\
-	file_extensions=.gif;\
-	icon=gif;\
-	action=browser
-
-image/ief: \
-	description=Image Exchange Format;\
-	file_extensions=.ief
-
-image/jpeg: \
-	description=JPEG Image;\
-	file_extensions=.jfif,.jfif-tbnl,.jpe,.jpg,.jpeg;\
-	icon=jpeg;\
-	action=browser
-
-image/tiff: \
-	description=TIFF Image;\
-	file_extensions=.tif,.tiff;\
-	icon=tiff
-
-image/vnd.fpx: \
-	description=FlashPix Image;\
-	file_extensions=.fpx,.fpix
-
-image/x-cmu-rast: \
-	description=CMU Raster Image;\
-	file_extensions=.ras
-
-image/x-portable-anymap: \
-	description=PBM Anymap Image;\
-	file_extensions=.pnm
-
-image/x-portable-bitmap: \
-	description=PBM Bitmap Image;\
-	file_extensions=.pbm
-
-image/x-portable-graymap: \
-	description=PBM Graymap Image;\
-	file_extensions=.pgm
-
-image/x-portable-pixmap: \
-	description=PBM Pixmap Image;\
-	file_extensions=.ppm
-
-image/x-rgb: \
-	description=RGB Image;\
-	file_extensions=.rgb
-
-image/x-xbitmap: \
-	description=X Bitmap Image;\
-	file_extensions=.xbm,.xpm
-
-image/x-xwindowdump: \
-	description=X Window Dump Image;\
-	file_extensions=.xwd
-
-image/png: \
-	description=PNG Image;\
-	file_extensions=.png;\
-	icon=png;\
-	action=browser
-
-image/bmp: \
-	description=Bitmap Image;\
-	file_extensions=.bmp;
-
-text/html: \
-	description=HTML Document;\
-	file_extensions=.htm,.html;\
-	icon=html
-
-text/plain: \
-	description=Plain Text;\
-	file_extensions=.text,.c,.cc,.c++,.h,.pl,.txt,.java,.el;\
-	icon=text;\
-	action=browser
-
-text/tab-separated-values: \
-	description=Tab Separated Values Text;\
-	file_extensions=.tsv
-
-text/x-setext: \
-	description=Structure Enhanced Text;\
-	file_extensions=.etx
-
-video/mpeg: \
-	description=MPEG Video Clip;\
-	file_extensions=.mpg,.mpe,.mpeg;\
-	icon=mpeg
-
-video/quicktime: \
-	description=QuickTime Video Clip;\
-	file_extensions=.mov,.qt
-
-application/x-troff-msvideo: \
-	description=AVI Video;\
-	file_extensions=.avi;\
-	icon=avi;\
-	action=application;\
-	application=mplayer.exe %s
-
-video/x-sgi-movie: \
-	description=SGI Movie;\
-	file_extensions=.movie,.mv
-
-message/rfc822: \
-	description=Internet Email Message;\
-	file_extensions=.mime
-
-application/xml: \
-	description=XML document;\
-	file_extensions=.xml
-
-