cziegeler 2003/01/30 03:50:41
Modified: sourceresolve/src/java/org/apache/excalibur/source/impl
URLSource.java
Log:
adding missing mime-type
Revision Changes Path
1.20 +16 -1
jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/URLSource.java
Index: URLSource.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/URLSource.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- URLSource.java 30 Jan 2003 07:57:10 -0000 1.19
+++ URLSource.java 30 Jan 2003 11:50:40 -0000 1.20
@@ -111,6 +111,9 @@
protected long cachedLastModificationDate;
+ /** The content type (if known) */
+ protected String mimeType;
+
/**
* Constructor
*/
@@ -211,6 +214,7 @@
}
this.lastModificationDate = this.connection.getLastModified();
this.contentLength = this.connection.getContentLength();
+ this.mimeType = this.connection.getContentType();
this.exists = true;
}
catch( IOException ignore )
@@ -433,4 +437,15 @@
}
return Collections.EMPTY_LIST;
}
+
+ /**
+ * The mime-type of the content described by this object.
+ * If the source is not able to determine the mime-type by itself
+ * this can be null.
+ */
+ public String getMimeType()
+ {
+ return this.mimeType;
+ }
+
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]