public class PlatformContentHandlerImpl extends ContentHandlerImpl
ContentHandlerImpl.DescriberContentHandler.ByteOrderMark, ContentHandler.Registry, ContentHandler.ValidityBYTE_ORDER_MARK_PROPERTY, CHARSET_PROPERTY, CONTENT_TYPE_PROPERTY, INVALID_CONTENT_DESCRIPTION, LINE_DELIMITER_PROPERTY, OPTION_REQUESTED_PROPERTIES, UNSPECIFIED_CONTENT_TYPE, VALIDITY_PROPERTY| Constructor and Description |
|---|
PlatformContentHandlerImpl() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.Object> |
contentDescription(URI uri,
java.io.InputStream inputStream,
java.util.Map<?,?> options,
java.util.Map<java.lang.Object,java.lang.Object> context)
This implementation delegates to the platform's content description support,
|
protected java.lang.String |
getCharset(URI uri,
java.io.InputStream inputStream,
java.util.Map<?,?> options,
java.util.Map<java.lang.Object,java.lang.Object> context)
This implementation only gets called when platform's content describer throws an exception, i.e., when the resource doesn't exist.
|
protected java.lang.Object |
getDescriptionValue(QualifiedName qualifiedName,
java.lang.Object value)
Returns the given property's Eclipse value converted to EMF's corresponding basic value.
|
protected java.lang.String |
getLineDelimiter(URI uri,
java.io.InputStream inputStream,
java.util.Map<?,?> options,
java.util.Map<java.lang.Object,java.lang.Object> context)
This implementation only gets called when platform's content describer throws an exception, i.e., when the resource doesn't exist.
|
protected QualifiedName |
getQualifiedName(java.lang.String property)
Returns the property name converted to a qualified name.
|
canHandle, createContentDescription, getByteOrderMark, getLineDelimiter, getRequestedProperties, isRequestedPropertyprotected QualifiedName getQualifiedName(java.lang.String property)
property - the property to convert.protected java.lang.Object getDescriptionValue(QualifiedName qualifiedName,
java.lang.Object value)
qualifiedName - the name of the property for which this value applies.value - the value to convert.public java.util.Map<java.lang.String,java.lang.Object> contentDescription(URI uri,
java.io.InputStream inputStream,
java.util.Map<?,?> options,
java.util.Map<java.lang.Object,java.lang.Object> context)
throws java.io.IOException
contentDescription in interface ContentHandlercontentDescription in class ContentHandlerImpluri - the URI for which to determine the content description.inputStream - the input stream associated with the given URI.options - a map of options to direct what kind of description is needed.context - a map of contextual information that content handlers use to store partially computed results.java.io.IOException - if there is a problem reading the stream.protected java.lang.String getCharset(URI uri,
java.io.InputStream inputStream,
java.util.Map<?,?> options,
java.util.Map<java.lang.Object,java.lang.Object> context)
throws java.io.IOException
platform resource URIs, it determines the character set from the workspace.getCharset in class ContentHandlerImpluri - the URI of the input stream.inputStream - the input stream.options - any options that might influence the interpretation of the content.context - a cache for previously computed information.java.io.IOException - if there is a problem loading the content.protected java.lang.String getLineDelimiter(URI uri,
java.io.InputStream inputStream,
java.util.Map<?,?> options,
java.util.Map<java.lang.Object,java.lang.Object> context)
throws java.io.IOException
platform resource URIs, it determines the line delimiter from the project/workspace preferences.getLineDelimiter in class ContentHandlerImpluri - the URI of the input stream.inputStream - the input stream.options - any options that might influence the interpretation of the content.context - a cache for previously computed information.java.io.IOException - if there is a problem loading the content.Copyright © 2018. Licensed under the Eclipse Public License v1.0. All rights reserved.
Submit a bug or feature