List of usage examples for java.io DataInput readUTF
String readUTF() throws IOException;
From source file:eu.larkc.iris.storage.IRIWritable.java
public static IRIWritable read(DataInput in) throws IOException { IRIWritable iriWritable = new IRIWritable(); String iri = in.readUTF(); iriWritable.iri = iri;//from w w w . jav a2s .c om return iriWritable; }
From source file:com.ebay.erl.mobius.util.SerializableUtil.java
public static Comparable<?> deseralizeComparable(DataInput in, Configuration conf) throws IOException { return (Comparable<?>) deserializeFromBase64(in.readUTF(), conf); }
From source file:eu.larkc.iris.storage.StringTermWritable.java
public static StringTermWritable read(DataInput in) throws IOException { StringTermWritable stringTermWritable = new StringTermWritable(); String stringTerm = in.readUTF(); stringTermWritable.stringTerm = stringTerm; return stringTermWritable; }
From source file:mobi.hsz.idea.gitignore.indexing.IgnoreEntryOccurrence.java
/** * Static helper to read {@link IgnoreEntryOccurrence} from the input stream. * * @param in input stream/*w ww . ja va 2 s . co m*/ * @return read {@link IgnoreEntryOccurrence} */ @Nullable public static synchronized IgnoreEntryOccurrence deserialize(@NotNull DataInput in) { try { String path = in.readUTF(); if (StringUtils.isEmpty(path)) { return null; } VirtualFile file = LocalFileSystem.getInstance().findFileByPath(path); if (file == null || !file.exists() || file.isDirectory()) { return null; } IgnoreEntryOccurrence entry = new IgnoreEntryOccurrence(file); int size = in.readInt(); for (int i = 0; i < size; i++) { Pattern pattern = Pattern.compile(in.readUTF()); Boolean isNegated = in.readBoolean(); entry.add(pattern, isNegated); } return entry; } catch (IOException e) { return null; } }
From source file:com.ebay.erl.mobius.util.SerializableUtil.java
public static CaseInsensitiveTreeMap deseralizeTreeMap(DataInput in) throws IOException { CaseInsensitiveTreeMap map = new CaseInsensitiveTreeMap(); int keys_nbr = in.readInt(); for (int i = 0; i < keys_nbr; i++) { map.put(in.readUTF(), in.readUTF()); }//ww w . j ava2s .c om return map; }
From source file:com.chinamobile.bcbsp.ml.VectorWritable.java
public static DoubleVector readVector(DataInput in) throws IOException { int length = in.readInt(); DoubleVector vector;/*from w ww .ja v a 2s. co m*/ vector = new DenseDoubleVector(length); for (int i = 0; i < length; i++) { vector.set(i, in.readDouble()); } if (in.readBoolean()) { vector = new NamedDoubleVector(in.readUTF(), vector); } return vector; }
From source file:com.bigdata.dastor.utils.FBUtilities.java
public static String readNullableString(DataInput dis) throws IOException { if (dis.readBoolean()) return null; return dis.readUTF(); }
From source file:com.splicemachine.derby.impl.sql.execute.operations.SpliceBaseOperation.java
public static String readNullableString(DataInput in) throws IOException { if (in.readBoolean()) return in.readUTF(); return null;//from w w w . jav a 2 s.c o m }
From source file:com.sirius.hadoop.job.onlinetime.StatusKey.java
@Override public void readFields(DataInput in) throws IOException { userId = in.readUTF(); time = in.readLong(); }
From source file:org.pivotal.customer.versonix.support.PaxReserveType.java
@Override public void fromData(DataInput in) throws IOException { id = in.readUTF(); linked = in.readBoolean(); }