diff options
author | Andre Weinand | 2004-02-10 08:44:29 +0000 |
---|---|---|
committer | Andre Weinand | 2004-02-10 08:44:29 +0000 |
commit | 8c3a00972181111df68d1d246596260f64f90fa2 (patch) | |
tree | 09fcfdfbd1182a3c8dd9350d419e4f9d117722ab | |
parent | 9330461cf72f856dfc4ff3ab498472cf7f9e665c (diff) | |
download | eclipse.platform.team-8c3a00972181111df68d1d246596260f64f90fa2.tar.gz eclipse.platform.team-8c3a00972181111df68d1d246596260f64f90fa2.tar.xz eclipse.platform.team-8c3a00972181111df68d1d246596260f64f90fa2.zip |
Encoding support work
3 files changed, 59 insertions, 1 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/IEncodedStreamContentAccessor.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/IEncodedStreamContentAccessor.java new file mode 100644 index 000000000..ba45b4daf --- /dev/null +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/IEncodedStreamContentAccessor.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright (c) 2000, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.compare; + +import org.eclipse.core.runtime.CoreException; + +/** + * Extension for <code>IStreamContentAccessor</code>. Extends the original + * concept of a <code>IStreamContentAccessor</code> to answer the Charset (encoding) used for the stream. + * + * @since 3.0 + */ +public interface IEncodedStreamContentAccessor extends IStreamContentAccessor { + + /** + * @return The character encoding of the stream returned by <code>getContents()</code>. + * @exception CoreException if the contents of this object could not be accessed + * @since 3.0 + */ + String getCharset() throws CoreException; +} diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/IStreamContentAccessorExtension2.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/IStreamContentAccessorExtension2.java index d6846b9b0..7bca8f01b 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/IStreamContentAccessorExtension2.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/IStreamContentAccessorExtension2.java @@ -16,7 +16,7 @@ import org.eclipse.core.runtime.CoreException; * Extension interface for <code>IStreamContentAccessor</code>. Extends the original * concept of a <code>IStreamContentAccessor</code> to answer the Charset (encoding) used for the stream. * - * @since 3.0 + * @deprecated Use <code>IEncodedStreamContentAccessor</code> instead */ public interface IStreamContentAccessorExtension2 extends IStreamContentAccessor { diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IEncodedStreamContentAccessor.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IEncodedStreamContentAccessor.java new file mode 100644 index 000000000..ba45b4daf --- /dev/null +++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IEncodedStreamContentAccessor.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright (c) 2000, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.compare; + +import org.eclipse.core.runtime.CoreException; + +/** + * Extension for <code>IStreamContentAccessor</code>. Extends the original + * concept of a <code>IStreamContentAccessor</code> to answer the Charset (encoding) used for the stream. + * + * @since 3.0 + */ +public interface IEncodedStreamContentAccessor extends IStreamContentAccessor { + + /** + * @return The character encoding of the stream returned by <code>getContents()</code>. + * @exception CoreException if the contents of this object could not be accessed + * @since 3.0 + */ + String getCharset() throws CoreException; +} |