Author: rhauch
Date: 2009-01-09 16:47:14 -0500 (Fri, 09 Jan 2009)
New Revision: 701
Modified:
trunk/dna-graph/src/main/java/org/jboss/dna/graph/mimetype/MimeTypeDetector.java
trunk/dna-graph/src/main/java/org/jboss/dna/graph/mimetype/package-info.java
Log:
DNA-264 Connectors may need to determine the MIME type for content
Minor documentation fixes.
Modified:
trunk/dna-graph/src/main/java/org/jboss/dna/graph/mimetype/MimeTypeDetector.java
===================================================================
---
trunk/dna-graph/src/main/java/org/jboss/dna/graph/mimetype/MimeTypeDetector.java 2009-01-09
21:37:10 UTC (rev 700)
+++
trunk/dna-graph/src/main/java/org/jboss/dna/graph/mimetype/MimeTypeDetector.java 2009-01-09
21:47:14 UTC (rev 701)
@@ -38,6 +38,9 @@
* Returns the MIME-type of a data source, using its supplied content and/or its
supplied name, depending upon the
* implementation. If the MIME-type cannot be determined, either a
"default" MIME-type or <code>null</code> may be returned,
* where the former will prevent earlier registered MIME-type detectors from being
consulted.
+ * <p>
+ * Note that detector implementations should <i>not</i> {@link
InputStream#close() close} the supplied input stream.
+ * </p>
*
* @param name The name of the data source; may be <code>null</code>.
* @param content The content of the data source; may be
<code>null</code>.
Modified: trunk/dna-graph/src/main/java/org/jboss/dna/graph/mimetype/package-info.java
===================================================================
---
trunk/dna-graph/src/main/java/org/jboss/dna/graph/mimetype/package-info.java 2009-01-09
21:37:10 UTC (rev 700)
+++
trunk/dna-graph/src/main/java/org/jboss/dna/graph/mimetype/package-info.java 2009-01-09
21:47:14 UTC (rev 701)
@@ -1,6 +1,8 @@
/**
- * This package defines a set of utilities for detecting the MIME type for a stream of
data and/or the name of
- * the file containing the data.
+ * This package defines an interface for the {@link MimeTypeDetector MIME type detector},
which represents a component
+ * that is able to determine the MIME type for a stream of data and/or the name of the
file containing the data.
+ * One implementation that uses the {@link ExtensionBasedMimeTypeDetector filename
extensions} is provided
+ * as a lightweight, flexible, and customizeable implementation.
*/
package org.jboss.dna.graph.mimetype;
Show replies by date