当前位置: 首页>>代码示例>>Java>>正文


Java IOUtil.writeString方法代码示例

本文整理汇总了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();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:FilesDelta.java

示例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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:BuildTargetTypeState.java

示例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();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:GenericCompilerPersistentData.java

示例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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:ForcedBuildFileAttribute.java

示例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;
}
 
开发者ID:headwirecom,项目名称:aem-ide-tooling-4-intellij,代码行数:19,代码来源:Util.java

示例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();
            }
        }
    }
}
 
开发者ID:headwirecom,项目名称:aem-ide-tooling-4-intellij,代码行数:20,代码来源:Util.java

示例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);
      }
    }
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:20,代码来源:FilesDelta.java

示例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());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:PsiElementsValidityState.java

示例9: save

import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
public void save(DataOutput out) throws IOException {
  IOUtil.writeString(destinationPath, out);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:CopyingCompiler.java

示例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);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:6,代码来源:OneToManyPathsMapping.java

示例11: save

import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
@Override
public void save(DataOutput out) throws IOException {
  IOUtil.writeString(destinationPath, out);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:5,代码来源:CopyingCompiler.java


注:本文中的com.intellij.util.io.IOUtil.writeString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。