String (byte @NotNull [] bytes, @NotNull String path) { VirtualFile file = findVirtualFile(path); Charset charset = file != null ? file.getCharset() : EncodingRegistry.getInstance().getDefaultCharset(); return CharsetToolkit.bytesToString(bytes, charset); }