tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1384093 - in /tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources: FileResource.java JarResource.java ResourceBase.java
Date Wed, 12 Sep 2012 19:16:20 GMT
Author: markt
Date: Wed Sep 12 19:16:19 2012
New Revision: 1384093

URL: http://svn.apache.org/viewvc?rev=1384093&view=rev
Log:
Implement some TODOs:
 - getter/setter for mime type

Modified:
    tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/FileResource.java
    tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/JarResource.java
    tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/ResourceBase.java

Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/FileResource.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/FileResource.java?rev=1384093&r1=1384092&r2=1384093&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/FileResource.java
(original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/FileResource.java
Wed Sep 12 19:16:19 2012
@@ -99,18 +99,6 @@ public class FileResource extends Resour
     }
 
     @Override
-    public void setMimeType(String mimeType) {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public String getMimeType() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    @Override
     public InputStream getInputStream() {
         if (resource.exists()) {
             try {

Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/JarResource.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/JarResource.java?rev=1384093&r1=1384092&r2=1384093&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/JarResource.java
(original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/JarResource.java
Wed Sep 12 19:16:19 2012
@@ -102,17 +102,6 @@ public class JarResource extends Resourc
         return null;
     }
 
-    @Override
-    public void setMimeType(String mimeType) {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public String getMimeType() {
-        // TODO Auto-generated method stub
-        return null;
-    }
 
     @Override
     public InputStream getInputStream() {

Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/ResourceBase.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/ResourceBase.java?rev=1384093&r1=1384092&r2=1384093&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/ResourceBase.java
(original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/ResourceBase.java
Wed Sep 12 19:16:19 2012
@@ -24,6 +24,8 @@ public abstract class ResourceBase imple
     private final WebResourceRoot root;
     private final String webAppPath;
 
+    private String mimeType = null;
+
 
     protected ResourceBase(WebResourceRoot root, String webAppPath) {
         this.root = root;
@@ -41,4 +43,16 @@ public abstract class ResourceBase imple
     public final String getWebappPath() {
         return webAppPath;
     }
+
+
+    @Override
+    public final void setMimeType(String mimeType) {
+        this.mimeType = mimeType;
+    }
+
+
+    @Override
+    public final String getMimeType() {
+        return mimeType;
+    }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message