本文整理汇总了Java中com.intellij.util.io.IOUtil.writeString方法的典型用法代码示例。如果您正苦于以下问题:Java IOUtil.writeString方法的具体用法?Java IOUtil.writeString怎么用?Java IOUtil.writeString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.util.io.IOUtil
的用法示例。
在下文中一共展示了IOUtil.writeString方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: save
import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
public void save(DataOutput out) throws IOException {
lockData();
try {
out.writeInt(myDeletedPaths.size());
for (String path : myDeletedPaths) {
IOUtil.writeString(path, out);
}
out.writeInt(myFilesToRecompile.size());
for (Map.Entry<BuildRootDescriptor, Set<File>> entry : myFilesToRecompile.entrySet()) {
IOUtil.writeString(entry.getKey().getRootId(), out);
final Set<File> files = entry.getValue();
out.writeInt(files.size());
for (File file : files) {
IOUtil.writeString(FileUtil.toSystemIndependentName(file.getPath()), out);
}
}
}
finally {
unlockData();
}
}
示例2: save
import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
public synchronized void save() {
try {
FileUtil.createParentDirs(myTargetsFile);
DataOutputStream output = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(myTargetsFile)));
try {
output.writeInt(0);
output.writeInt(myTargetIds.size());
for (Map.Entry<BuildTarget<?>, Integer> entry : myTargetIds.entrySet()) {
IOUtil.writeString(entry.getKey().getId(), output);
output.writeInt(entry.getValue());
}
}
finally {
output.close();
}
}
catch (IOException e) {
LOG.info("Cannot save " + myTargetType.getTypeId() + " targets data: " + e.getMessage(), e);
}
}
示例3: save
import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
public void save() throws IOException {
final DataOutputStream output = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(myFile)));
try {
output.writeInt(VERSION);
output.writeInt(myCompilerVersion);
output.writeInt(myTarget2Id.size());
for (Map.Entry<String, Integer> entry : myTarget2Id.entrySet()) {
IOUtil.writeString(entry.getKey(), output);
output.writeInt(entry.getValue());
}
}
finally {
output.close();
}
}
示例4: forceBuildFile
import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
private static void forceBuildFile(VirtualFile file, @Nullable String value) {
if (file instanceof NewVirtualFile) {
final DataOutputStream os = FRAMEWORK_FILE_ATTRIBUTE.writeAttribute(file);
try {
try {
IOUtil.writeString(StringUtil.notNullize(value), os);
}
finally {
os.close();
}
}
catch (IOException e) {
LOG.error(e);
}
}
else {
file.putUserData(FRAMEWORK_FILE_MARKER, value);
}
}
示例5: visitFile
import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
@Override
public boolean visitFile(VirtualFile file) {
file.putUserData(MODIFICATION_DATE_KEY, null);
if(file instanceof NewVirtualFile) {
final DataOutputStream os = MODIFICATION_STAMP_FILE_ATTRIBUTE.writeAttribute(file);
try {
try {
IOUtil.writeString(StringUtil.notNullize("0"), os);
} finally {
os.close();
}
} catch(IOException e) {
// Ignore it but we might need to throw an exception
String message = e.getMessage();
}
}
return recursive;
}
示例6: setModificationStamp
import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
public static void setModificationStamp(VirtualFile file) {
// Store it in memory first
if(file != null) {
file.putUserData(Util.MODIFICATION_DATE_KEY, file.getTimeStamp());
if(file instanceof NewVirtualFile) {
final DataOutputStream os = MODIFICATION_STAMP_FILE_ATTRIBUTE.writeAttribute(file);
try {
try {
IOUtil.writeString(StringUtil.notNullize(file.getTimeStamp() + ""), os);
} finally {
os.close();
}
} catch(IOException e) {
// Ignore it but we might need to throw an exception
String message = e.getMessage();
}
}
}
}
示例7: save
import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
public void save(DataOutput out) throws IOException {
out.writeInt(myDeletedPaths.size());
synchronized (myDeletedPaths) {
for (String path : myDeletedPaths) {
IOUtil.writeString(path, out);
}
}
synchronized (myFilesToRecompile) {
out.writeInt(myFilesToRecompile.size());
for (Map.Entry<BuildRootDescriptor, Set<File>> entry : myFilesToRecompile.entrySet()) {
IOUtil.writeString(entry.getKey().getRootId(), out);
final Set<File> files = entry.getValue();
out.writeInt(files.size());
for (File file : files) {
IOUtil.writeString(FileUtil.toSystemIndependentName(file.getPath()), out);
}
}
}
}
示例8: save
import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
public void save(DataOutput out) throws IOException {
final Set<Map.Entry<String, Long>> entries = myDependencies.entrySet();
out.writeInt(entries.size());
for (Map.Entry<String, Long> entry : entries) {
IOUtil.writeString(entry.getKey(), out);
out.writeLong(entry.getValue().longValue());
}
}
示例9: save
import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
public void save(DataOutput out) throws IOException {
IOUtil.writeString(destinationPath, out);
}
示例10: save
import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
public void save(DataOutput out, Collection<String> value) throws IOException {
for (String str : value) {
IOUtil.writeString(str, out);
}
}
示例11: save
import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
@Override
public void save(DataOutput out) throws IOException {
IOUtil.writeString(destinationPath, out);
}