Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.core.runtime.content
Interface ITextContentDescriber

All Superinterfaces:
IContentDescriber
All Known Implementing Classes:
org.eclipse.core.internal.content.TextContentDescriber, XMLContentDescriber, XMLRootElementContentDescriber, XMLRootElementContentDescriber2

public interface ITextContentDescriber
extends IContentDescriber

Text content describers extend basic content describers to provide the ability of scanning character streams (readers). Describers for text-based content types must implement this interface instead of 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.

Since:
3.0
See Also:
IContentDescription

Field Summary
 
Fields inherited from interface org.eclipse.core.runtime.content. IContentDescriber
INDETERMINATE, INVALID, VALID
 
Method Summary
 int describe ( Reader contents, IContentDescription description)
          Tries to fill a description for the given contents.
 
Methods inherited from interface org.eclipse.core.runtime.content. IContentDescriber
describe, getSupportedOptions
 

Method Detail

describe

int describe(
Reader contents,
             
IContentDescription description)
             throws 
IOException
Tries to fill a description for the given contents. Returns an 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.

Parameters:
contents - the contents to be examined
description - a description to be filled in, or null if only content type validation is to be performed
Returns:
one of the following:
  • VALID
  • INVALID
  • INDETERMINATE
Throws:
IOException - if an I/O error occurs
See Also:
IContentDescription, IContentDescriber.VALID, IContentDescriber.INVALID, IContentDescriber.INDETERMINATE

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire