public abstract class EncodingRegistry
extends java.lang.Object
Constructor and Description |
---|
EncodingRegistry() |
Modifier and Type | Method and Description |
---|---|
static <E extends java.lang.Throwable> |
doActionAndRestoreEncoding(VirtualFile fileBefore,
ThrowableComputable<? extends VirtualFile,E> action) |
abstract java.nio.charset.Charset |
getDefaultCharset() |
java.nio.charset.Charset |
getDefaultCharsetForPropertiesFiles(VirtualFile virtualFile) |
abstract java.nio.charset.Charset |
getEncoding(VirtualFile virtualFile,
boolean useParentDefaults) |
static EncodingRegistry |
getInstance() |
abstract boolean |
isNative2Ascii(VirtualFile virtualFile) |
abstract boolean |
isNative2AsciiForPropertiesFiles() |
abstract void |
setEncoding(VirtualFile virtualFileOrDir,
java.nio.charset.Charset charset) |
public abstract boolean isNative2Ascii(VirtualFile virtualFile)
public abstract boolean isNative2AsciiForPropertiesFiles()
public abstract java.nio.charset.Charset getDefaultCharset()
public abstract java.nio.charset.Charset getEncoding(VirtualFile virtualFile, boolean useParentDefaults)
virtualFile
- file to get encoding foruseParentDefaults
- true to determine encoding from the parentpublic abstract void setEncoding(VirtualFile virtualFileOrDir, java.nio.charset.Charset charset)
public java.nio.charset.Charset getDefaultCharsetForPropertiesFiles(VirtualFile virtualFile)
public static EncodingRegistry getInstance()
public static <E extends java.lang.Throwable> VirtualFile doActionAndRestoreEncoding(VirtualFile fileBefore, ThrowableComputable<? extends VirtualFile,E> action) throws E extends java.lang.Throwable
E extends java.lang.Throwable