|
ModeShape Distribution 3.0.0.Alpha5 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MimeTypeDetector

MIME-type detection libraries must provide thread-safe implementations of this interface to enable ModeShape to use the libraries to return MIME-types for data sources. Implementors are expected to have a public, no-arg constructor.
| Method Summary | |
|---|---|
String |
mimeTypeOf(String name,
InputStream content)
Returns the MIME-type of a data source, using its supplied content and/or its supplied name, depending upon the implementation. |
| Method Detail |
|---|
String mimeTypeOf(String name,
InputStream content)
throws IOException
null may be returned,
where the former will prevent earlier registered MIME-type detectors from being consulted.
Note that detector implementations should not close the supplied input stream and should
try their best to reset the stream.
name - The name of the data source; may be null.content - The content of the data source; may be null.
null if the MIME-type could not be determined.
IOException - If an error occurs reading the supplied content.
|
ModeShape Distribution 3.0.0.Alpha5 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||