本文整理了Java中org.eclipse.jdt.internal.compiler.util.Util.getFileCharContent()
方法的一些代码示例,展示了Util.getFileCharContent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.getFileCharContent()
方法的具体详情如下:
包路径:org.eclipse.jdt.internal.compiler.util.Util
类名称:Util
方法名:getFileCharContent
[英]Returns the contents of the given file as a char array. When encoding is null, then the platform default one is used
[中]以字符数组的形式返回给定文件的内容。当编码为空时,则使用平台默认编码
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
public char[] getContents() {
if (this.contents != null)
return this.contents; // answer the cached source
// otherwise retrieve it
try {
return Util.getFileCharContent(new File(new String(this.fileName)), this.encoding);
} catch (IOException e) {
// could not read file: returns an empty array
}
return CharOperation.NO_CHAR;
}
/**
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
public char[] getContents() {
if (this.contents != null)
return this.contents; // answer the cached source
// otherwise retrieve it
try {
return Util.getFileCharContent(new File(new String(this.fileName)), this.encoding);
} catch (IOException e) {
// could not read file: returns an empty array
}
return CharOperation.NO_CHAR;
}
/**
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
public char[] getContents() {
if (this.contents != null)
return this.contents; // answer the cached source
// otherwise retrieve it
try {
return Util.getFileCharContent(new File(new String(this.fileName)), this.encoding);
} catch (IOException e) {
// could not read file: returns an empty array
}
return CharOperation.NO_CHAR;
}
/**
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
public char[] getContents() {
if (this.contents != null)
return this.contents; // answer the cached source
// otherwise retrieve it
try {
return Util.getFileCharContent(new File(new String(this.fileName)), this.encoding);
} catch (IOException e) {
// could not read file: returns an empty array
}
return CharOperation.NO_CHAR;
}
/**
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
public char[] getContents() {
if (this.contents != null)
return this.contents; // answer the cached source
// otherwise retrieve it
try {
return Util.getFileCharContent(new File(new String(this.fileName)), this.encoding);
} catch (IOException e) {
// could not read file: returns an empty array
}
return CharOperation.NO_CHAR;
}
/**
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
public char[] getContents() {
if (this.contents != null)
return this.contents; // answer the cached source
// otherwise retrieve it
try {
return Util.getFileCharContent(new File(new String(this.fileName)), this.encoding);
} catch (IOException e) {
this.contents = CharOperation.NO_CHAR; // assume no source if asked again
throw new AbortCompilationUnit(null, e, this.encoding);
}
}
/**
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
public char[] getContents() {
if (this.contents != null)
return this.contents; // answer the cached source
// otherwise retrieve it
try {
return Util.getFileCharContent(new File(new String(this.fileName)), this.encoding);
} catch (IOException e) {
this.contents = CharOperation.NO_CHAR; // assume no source if asked again
throw new AbortCompilationUnit(null, e, this.encoding);
}
}
/**
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
public char[] getContents() {
if (this.contents != null)
return this.contents; // answer the cached source
// otherwise retrieve it
try {
return Util.getFileCharContent(new File(new String(this.fileName)), this.encoding);
} catch (IOException e) {
this.contents = CharOperation.NO_CHAR; // assume no source if asked again
throw new AbortCompilationUnit(null, e, this.encoding);
}
}
/**
代码示例来源:origin: org.eclipse.jetty.orbit/org.eclipse.jdt.core
public char[] getContents() {
if (this.contents != null)
return this.contents; // answer the cached source
// otherwise retrieve it
try {
return Util.getFileCharContent(new File(new String(this.fileName)), this.encoding);
} catch (IOException e) {
this.contents = CharOperation.NO_CHAR; // assume no source if asked again
throw new AbortCompilationUnit(null, e, this.encoding);
}
}
/**
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
public char[] getContents() {
if (this.contents != null)
return this.contents; // answer the cached source
// otherwise retrieve it
try {
return Util.getFileCharContent(new File(new String(this.fileName)), this.encoding);
} catch (IOException e) {
this.contents = CharOperation.NO_CHAR; // assume no source if asked again
throw new AbortCompilationUnit(null, e, this.encoding);
}
}
/**
代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj
public char[] getContents() {
if (this.contents != null)
return this.contents; // answer the cached source
// otherwise retrieve it
try {
return Util.getFileCharContent(new File(new String(this.fileName)), this.encoding);
} catch (IOException e) {
this.contents = CharOperation.NO_CHAR; // assume no source if asked again
throw new AbortCompilationUnit(null, e, this.encoding);
}
}
/**
代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps
public char[] getContents() {
if (this.contents != null)
return this.contents; // answer the cached source
// otherwise retrieve it
try {
return Util.getFileCharContent(new File(new String(this.fileName)), this.encoding);
} catch (IOException e) {
this.contents = CharOperation.NO_CHAR; // assume no source if asked again
throw new AbortCompilationUnit(null, e, this.encoding);
}
}
/**
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
public char[] getContents() {
if (this.contents != null)
return this.contents; // answer the cached source
// otherwise retrieve it
try {
return Util.getFileCharContent(new File(new String(this.fileName)), this.encoding);
} catch (IOException e) {
this.contents = CharOperation.NO_CHAR; // assume no source if asked again
throw new AbortCompilationUnit(null, e, this.encoding);
}
}
/**
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
public char[] getContents() {
if (this.contents != null)
return this.contents; // answer the cached source
// otherwise retrieve it
try {
return Util.getFileCharContent(new File(new String(this.fileName)), this.encoding);
} catch (IOException e) {
this.contents = CharOperation.NO_CHAR; // assume no source if asked again
throw new AbortCompilationUnit(null, e, this.encoding);
}
}
/**
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
@Override
public char[] getContents() {
if (this.contents != null)
return this.contents; // answer the cached source
// otherwise retrieve it
try {
return Util.getFileCharContent(new File(new String(this.fileName)), this.encoding);
} catch (IOException e) {
this.contents = CharOperation.NO_CHAR; // assume no source if asked again
throw new AbortCompilationUnit(null, e, this.encoding);
}
}
/**
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
static class IntArrayList {
public int[] list = new int[5];
public int length = 0;
public void add(int i) {
if (this.list.length == this.length) {
System.arraycopy(this.list, 0, this.list = new int[this.length*2], 0, this.length);
}
this.list[this.length++] = i;
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
static class IntArrayList {
public int[] list = new int[5];
public int length = 0;
public void add(int i) {
if (this.list.length == this.length) {
System.arraycopy(this.list, 0, this.list = new int[this.length*2], 0, this.length);
}
this.list[this.length++] = i;
}
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
static class IntArrayList {
public int[] list = new int[5];
public int length = 0;
public void add(int i) {
if (this.list.length == this.length) {
System.arraycopy(this.list, 0, this.list = new int[this.length*2], 0, this.length);
}
this.list[this.length++] = i;
}
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
static class IntArrayList {
public int[] list = new int[5];
public int length = 0;
public void add(int i) {
if (this.list.length == this.length) {
System.arraycopy(this.list, 0, this.list = new int[this.length*2], 0, this.length);
}
this.list[this.length++] = i;
}
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
static class IntArrayList {
public int[] list = new int[5];
public int length = 0;
public void add(int i) {
if (this.list.length == this.length) {
System.arraycopy(this.list, 0, this.list = new int[this.length*2], 0, this.length);
}
this.list[this.length++] = i;
}
}
内容来源于网络,如有侵权,请联系作者删除!