eu.esdihumboldt.hale.common.core.io.util
Class GZipContentDescriber
java.lang.Object
eu.esdihumboldt.hale.common.core.io.util.GZipContentDescriber
- All Implemented Interfaces:
- org.eclipse.core.runtime.content.IContentDescriber, org.eclipse.core.runtime.IExecutableExtension
- Direct Known Subclasses:
- GZipXMLContentDescriber, GZipXMLRootElementContentDescriber
public class GZipContentDescriber
- extends Object
- implements org.eclipse.core.runtime.content.IContentDescriber, org.eclipse.core.runtime.IExecutableExtension
Detects if a stream is compressed with GZip. Optionally uses an internal
content describer to verify the uncompressed content of a stream.
- Author:
- Simon Templer
Fields inherited from interface org.eclipse.core.runtime.content.IContentDescriber |
INDETERMINATE, INVALID, VALID |
Constructor Summary |
GZipContentDescriber()
Default constructor. |
GZipContentDescriber(org.eclipse.core.runtime.content.IContentDescriber internalContentDescriber)
Constructor using an internal content describer for the uncompressed
content. |
Method Summary |
int |
describe(InputStream contents,
org.eclipse.core.runtime.content.IContentDescription description)
|
org.eclipse.core.runtime.QualifiedName[] |
getSupportedOptions()
|
static boolean |
isGZipContentType(org.eclipse.core.runtime.content.IContentType contentType)
Determines if the given content type is a GZip content type. |
void |
setInitializationData(org.eclipse.core.runtime.IConfigurationElement config,
String propertyName,
Object data)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GZIP_CONTENT_TYPE_ID
public static final String GZIP_CONTENT_TYPE_ID
- The GZip content type identifier as specified in the plugin.xml
- See Also:
- Constant Field Values
GZipContentDescriber
public GZipContentDescriber()
- Default constructor.
GZipContentDescriber
public GZipContentDescriber(org.eclipse.core.runtime.content.IContentDescriber internalContentDescriber)
- Constructor using an internal content describer for the uncompressed
content.
- Parameters:
internalContentDescriber
- the content describer for the
uncompressed content
describe
public int describe(InputStream contents,
org.eclipse.core.runtime.content.IContentDescription description)
throws IOException
- Specified by:
describe
in interface org.eclipse.core.runtime.content.IContentDescriber
- Throws:
IOException
- See Also:
IContentDescriber.describe(InputStream, IContentDescription)
getSupportedOptions
public org.eclipse.core.runtime.QualifiedName[] getSupportedOptions()
- Specified by:
getSupportedOptions
in interface org.eclipse.core.runtime.content.IContentDescriber
- See Also:
IContentDescriber.getSupportedOptions()
isGZipContentType
public static boolean isGZipContentType(org.eclipse.core.runtime.content.IContentType contentType)
- Determines if the given content type is a GZip content type.
- Parameters:
contentType
- the content type
- Returns:
true
if the content type is the GZip content type or
it extends the GZip content type
setInitializationData
public void setInitializationData(org.eclipse.core.runtime.IConfigurationElement config,
String propertyName,
Object data)
throws org.eclipse.core.runtime.CoreException
- Specified by:
setInitializationData
in interface org.eclipse.core.runtime.IExecutableExtension
- Throws:
org.eclipse.core.runtime.CoreException
- See Also:
IExecutableExtension.setInitializationData(IConfigurationElement,
String, Object)
Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d