本文整理汇总了Java中com.intellij.util.io.IOUtil.readUTF方法的典型用法代码示例。如果您正苦于以下问题:Java IOUtil.readUTF方法的具体用法?Java IOUtil.readUTF怎么用?Java IOUtil.readUTF使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.util.io.IOUtil
的用法示例。
在下文中一共展示了IOUtil.readUTF方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getValueExternalizer
import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
@NotNull
@Override
public DataExternalizer<XsdNamespaceBuilder> getValueExternalizer() {
return new DataExternalizer<XsdNamespaceBuilder>() {
@Override
public void save(@NotNull DataOutput out, XsdNamespaceBuilder value) throws IOException {
IOUtil.writeUTF(out, value.getNamespace() == null ? "" : value.getNamespace());
IOUtil.writeUTF(out, value.getVersion() == null ? "" : value.getVersion());
writeList(out, value.getTags());
writeList(out, value.getRootTags());
}
@Override
public XsdNamespaceBuilder read(@NotNull DataInput in) throws IOException {
return new XsdNamespaceBuilder(IOUtil.readUTF(in),
IOUtil.readUTF(in),
readList(in),
readList(in));
}
};
}
示例2: read
import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
@Nullable
@Override
public Set<MyResourceInfo> read(@NotNull DataInput in) throws IOException {
final int size = DataInputOutputUtil.readINT(in);
if (size < 0 || size > 65535) {
// Something is very wrong; trigger an index rebuild
throw new IOException("Corrupt Index: Size " + size);
}
if (size == 0) {
return Collections.emptySet();
}
final Set<MyResourceInfo> result = Sets.newHashSetWithExpectedSize(size);
for (int i = 0; i < size; i++) {
final String type = IOUtil.readUTF(in);
final String name = IOUtil.readUTF(in);
final String context = IOUtil.readUTF(in);
final int offset = DataInputOutputUtil.readINT(in);
result.add(new MyResourceInfo(new ResourceEntry(type, name, context), offset));
}
return result;
}
示例3: read
import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
@Override
public List<SourcePathAndRootIndex> read(@NotNull DataInput in) throws IOException {
List<SourcePathAndRootIndex> result = new SmartList<SourcePathAndRootIndex>();
final DataInputStream stream = (DataInputStream)in;
while (stream.available() > 0) {
final String path = IOUtil.readUTF(stream);
final int index = stream.readInt();
result.add(new SourcePathAndRootIndex(path, index));
}
return result;
}
示例4: read
import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
public Collection<String> read(@NotNull DataInput in) throws IOException {
final Set<String> result = new THashSet<String>(FileUtil.PATH_HASHING_STRATEGY);
final DataInputStream stream = (DataInputStream)in;
while (stream.available() > 0) {
final String str = IOUtil.readUTF(stream);
result.add(str);
}
return result;
}
示例5: read
import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
@Override
public VirtualFileSetState read(@NotNull DataInput in) throws IOException {
final VirtualFileSetState state = new VirtualFileSetState();
int size = in.readInt();
while (size-- > 0) {
final String url = IOUtil.readUTF(in);
final long timestamp = in.readLong();
state.myTimestamps.put(url, timestamp);
}
return state;
}
示例6: read
import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
@Override
public VirtualFileWithDependenciesState read(@NotNull DataInput in) throws IOException {
final VirtualFileWithDependenciesState state = new VirtualFileWithDependenciesState(in.readLong());
int size = in.readInt();
while (size-- > 0) {
final String url = IOUtil.readUTF(in);
final long timestamp = in.readLong();
state.myDependencies.put(url, timestamp);
}
return state;
}
示例7: read
import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
@Override
public Set<String> read(@NotNull DataInput in) throws IOException {
final int size = DataInputOutputUtil.readINT(in);
final Set<String> result = new HashSet<String>(size);
for (int i = 0; i < size; i++) {
final String s = IOUtil.readUTF(in);
result.add(s);
}
return result;
}
示例8: read
import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
@Override
public VirtualFileWithDependenciesState read(@Nonnull DataInput in) throws IOException {
final VirtualFileWithDependenciesState state = new VirtualFileWithDependenciesState(in.readLong());
int size = in.readInt();
while (size-- > 0) {
final String url = IOUtil.readUTF(in);
final long timestamp = in.readLong();
state.myDependencies.put(url, timestamp);
}
return state;
}
示例9: read
import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
@Override
public ArtifactPackagingItemOutputState read(DataInput in) throws IOException {
int size = in.readInt();
SmartList<Pair<String, Long>> destinations = new SmartList<Pair<String, Long>>();
while (size-- > 0) {
String path = IOUtil.readUTF(in);
long outputTimestamp = in.readLong();
destinations.add(Pair.create(path, outputTimestamp));
}
return new ArtifactPackagingItemOutputState(destinations);
}
示例10: read
import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
@Override
public VcsRef read(@Nonnull DataInput in) throws IOException {
CommitId commitId = myCommitIdKeyDescriptor.read(in);
if (commitId == null) throw new IOException("Can not read commit id for reference");
String name = IOUtil.readUTF(in);
VcsRefType type = myLogProviders.get(commitId.getRoot()).getReferenceManager().deserialize(in);
return new VcsRefImpl(commitId.getHash(), name, type, commitId.getRoot());
}
示例11: getValueExternalizer
import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
@NotNull
@Override
public DataExternalizer<XsdNamespaceBuilder> getValueExternalizer()
{
return new DataExternalizer<XsdNamespaceBuilder>()
{
@Override
public void save(@NotNull DataOutput out, XsdNamespaceBuilder value) throws IOException
{
IOUtil.writeUTF(out, value.getNamespace() != null ? value.getNamespace() : NULL_STRING);
IOUtil.writeUTF(out, value.getVersion() != null ? value.getVersion() : NULL_STRING);
IOUtil.writeStringList(out, value.getTags());
IOUtil.writeStringList(out, value.getRootTags());
}
@Override
public XsdNamespaceBuilder read(@NotNull DataInput in) throws IOException
{
String namespace = IOUtil.readUTF(in);
if(NULL_STRING.equals(namespace))
{
namespace = null;
}
String version = IOUtil.readUTF(in);
if(NULL_STRING.equals(version))
{
version = null;
}
return new XsdNamespaceBuilder(namespace, version, IOUtil.readStringList(in), IOUtil.readStringList(in));
}
};
}
示例12: read
import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
public File read(@NotNull DataInput in) throws IOException {
return new File(IOUtil.readUTF(in));
}
示例13: readUTF
import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
protected static String readUTF(DataInput in) throws IOException {
return IOUtil.readUTF(in);
}
示例14: readString
import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
@NotNull
public static String readString(DataInput in) throws IOException {
return IOUtil.readUTF(in);
}
示例15: read
import com.intellij.util.io.IOUtil; //导入方法依赖的package包/类
@Override
public Key read(@NotNull DataInput in) throws IOException {
boolean isMarker = in.readBoolean();
return isMarker ? MARKER_KEY : new Key(IOUtil.readUTF(in));
}