|
Eclipse Platform Release 3.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.internal.content.TextContentDescriber
org.eclipse.core.runtime.content.XMLContentDescriber
public class XMLContentDescriber
A content describer for XML files. This class provides basis for XML-based content describers.
The document is detected by the describer as VALID
, if it
contains an xml declaration with <?xml
prefix and the
encoding in the declaration is correct.
VALID
IContentDescriber
,
XMLRootElementContentDescriber2
,
"http://www.w3.org/TR/REC-xml *"org.eclipse.core.runtime.contentTypes
extension
point.Field Summary |
---|
Fields inherited from interface org.eclipse.core.runtime.content.IContentDescriber |
---|
INDETERMINATE, INVALID, VALID |
Constructor Summary | |
---|---|
XMLContentDescriber()
|
Method Summary | |
---|---|
int |
describe(InputStream input,
IContentDescription description)
Tries to fill a description for the given contents. |
int |
describe(Reader input,
IContentDescription description)
Tries to fill a description for the given contents. |
QualifiedName[] |
getSupportedOptions()
Returns the properties supported by this describer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLContentDescriber()
Method Detail |
---|
public int describe(InputStream input, IContentDescription description) throws IOException
IContentDescriber
int
indicating whether the given stream of
bytes represents a valid sample for its corresponding content type.
If no content description is provided, this method should perform
content type validation.
The input stream must be kept open, and any IOExceptions while reading the stream should flow to the caller.
describe
in interface IContentDescriber
describe
in class org.eclipse.core.internal.content.TextContentDescriber
input
- the contents to be examineddescription
- a description to be filled in, or null
if
only content type validation is to be performed
VALID
INVALID
INDETERMINATE
IOException
- if an I/O error occursIContentDescription
,
IContentDescriber.VALID
,
IContentDescriber.INVALID
,
IContentDescriber.INDETERMINATE
public int describe(Reader input, IContentDescription description) throws IOException
ITextContentDescriber
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.
describe
in interface ITextContentDescriber
describe
in class org.eclipse.core.internal.content.TextContentDescriber
input
- the contents to be examineddescription
- a description to be filled in, or null
if
only content type validation is to be performed
VALID
INVALID
INDETERMINATE
IOException
- if an I/O error occursIContentDescription
,
IContentDescriber.VALID
,
IContentDescriber.INVALID
,
IContentDescriber.INDETERMINATE
public QualifiedName[] getSupportedOptions()
IContentDescriber
getSupportedOptions
in interface IContentDescriber
getSupportedOptions
in class org.eclipse.core.internal.content.TextContentDescriber
IContentDescriber.describe(java.io.InputStream, org.eclipse.core.runtime.content.IContentDescription)
|
Eclipse Platform Release 3.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.