public interface ITextContentDescriber extends IContentDescriber
IContentDescription
.
Note: It is expected that content describer implementations be declared in a package that is exempt from plug-in activation (using the Eclipse-AutoStart bundle manifest header). Since all describers are instantiated when the content type framework is initialized, failure in complying with this requirement causes premature activation, which must be avoided. Future implementations of the framework might refuse to instantiate describers if doing so would trigger activation of the corresponding plug-in.
Clients may implement this interface.
IContentDescription
INDETERMINATE, INVALID, VALID
Modifier and Type | Method and Description |
---|---|
int |
describe(Reader contents,
IContentDescription description)
Tries to fill a description for the given contents.
|
describe, getSupportedOptions
int describe(Reader contents, IContentDescription description) throws IOException
int
indicating whether the given stream of
characters represents a valid sample for this describer's corresponding
content type. If no content description is provided, this method should
only perform content type validation.
The stream provided must be kept open, and any IOExceptions while reading it should flow to the caller.
contents
- the contents to be examineddescription
- a description to be filled in, or null
if
only content type validation is to be performedVALID
INVALID
INDETERMINATE
IOException
- if an I/O error occursIContentDescription
,
IContentDescriber.VALID
,
IContentDescriber.INVALID
,
IContentDescriber.INDETERMINATE
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.