Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/AbstractFileBuffer.java')
-rw-r--r--org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/AbstractFileBuffer.java30
1 files changed, 0 insertions, 30 deletions
diff --git a/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/AbstractFileBuffer.java b/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/AbstractFileBuffer.java
index 874a0eddecf..6be8c2a9e34 100644
--- a/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/AbstractFileBuffer.java
+++ b/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/AbstractFileBuffer.java
@@ -13,7 +13,6 @@ package org.eclipse.core.internal.filebuffers;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.content.IContentDescription;
import org.eclipse.core.filebuffers.IFileBuffer;
@@ -34,33 +33,4 @@ public abstract class AbstractFileBuffer implements IFileBuffer {
public abstract void requestSynchronizationContext();
public abstract void releaseSynchronizationContext();
-
-
- /**
- * Helper method which computes the encoding out of the given description.
- * <p>
- * XXX:
- * This method should be provided by Platform Core
- * see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=64342
- * </p>
- *
- * @param description the content description
- * @return the encoding
- * @see org.eclipse.core.resources.IFile#getCharset()
- */
- static String getCharset(IContentDescription description) {
- if (description == null)
- return null;
- byte[] bom= (byte[]) description.getProperty(IContentDescription.BYTE_ORDER_MARK);
- if (bom != null)
- if (bom == IContentDescription.BOM_UTF_8)
- return "UTF-8"; //$NON-NLS-1$
- else if (bom == IContentDescription.BOM_UTF_16BE || bom == IContentDescription.BOM_UTF_16LE)
- // UTF-16 will properly detect the BOM
- return "UTF-16"; //$NON-NLS-1$
- else {
- // unknown BOM... ignore it
- }
- return (String)description.getProperty(IContentDescription.CHARSET);
- }
}

Back to the top