Example usage for java.io DataInput readUTF

List of usage examples for java.io DataInput readUTF

Introduction

In this page you can find the example usage for java.io DataInput readUTF.

Prototype

String readUTF() throws IOException;

Source Link

Document

Reads in a string that has been encoded using a modified UTF-8 format.

Usage

From source file:eu.larkc.iris.storage.IRIWritable.java

@Override
public void readFields(DataInput in) throws IOException {
    iri = in.readUTF();
}

From source file:eu.larkc.iris.storage.StringTermWritable.java

@Override
public void readFields(DataInput in) throws IOException {
    stringTerm = in.readUTF();
}

From source file:IndexService.IColumnInputSplit.java

@Override
public void readFields(DataInput in) throws IOException {
    this.file = new Path(in.readUTF());
    this.splitbyline = in.readBoolean();
    this.wholefileASasplit = in.readBoolean();
    if (splitbyline) {
        if (!wholefileASasplit) {
            this.beginline = in.readInt();
            this.recnum = in.readInt();
        }//w w w . ja v  a 2s .c  o  m
    } else {
        this.beginkey = new IRecord.IFValue();
        beginkey.readFields(in);
        this.recnum = in.readInt();
    }
}

From source file:IndexService.IndexMergeIFormatSplit.java

@Override
public void readFields(DataInput in) throws IOException {
    this.file = new Path(in.readUTF());
    this.splitbyline = in.readBoolean();
    this.wholefileASasplit = in.readBoolean();
    if (splitbyline) {
        if (!wholefileASasplit) {
            this.beginline = in.readInt();
            this.recnum = in.readInt();
        }/*w  w  w  . j a v  a  2  s .c o m*/
    } else {
        this.beginkey = new IRecord.IFValue();
        beginkey.readFields(in);
        this.recnum = in.readInt();
    }

}

From source file:org.springdata.ehcache.core.Book.java

@Override
public void readFields(DataInput in) throws IOException {
    id = in.readLong();//from   w ww  .java2 s . c  om
    author = in.readUTF();
    price = in.readDouble();
}

From source file:com.vmware.demo.sgf.tests.domain.PersonKey.java

@Override
public void fromData(DataInput in) throws IOException, ClassNotFoundException {
    id = in.readInt();// w  w  w  .  j  av  a2s  .com
    surname = in.readUTF();
}

From source file:com.vmware.demo.sgf.tests.domain.Person.java

@Override
public void fromData(DataInput in) throws IOException, ClassNotFoundException {
    Id = in.readInt();/*from w w  w. j  a v  a  2  s  . com*/
    firstname = in.readUTF();
    surname = in.readUTF();
    zipcode = in.readUTF();
    dateofBirth = DataSerializer.readDate(in);
}

From source file:com.mongodb.hadoop.mapred.input.MongoInputSplit.java

public void readFields(DataInput in) throws IOException {
    final ObjectInputStream objIn = new ObjectInputStream((InputStream) in);

    _mongoURI = new MongoURI(in.readUTF());
    _querySpec = (DBObject) JSON.parse(in.readUTF());
    _fieldSpec = (DBObject) JSON.parse(in.readUTF());
    _sortSpec = (DBObject) JSON.parse(in.readUTF());
    _limit = in.readInt();/* www . ja v a 2  s . c om*/
    _skip = in.readInt();

    log.info("Deserialized MongoInputSplit ... { length = " + getLength() + ", locations = "
            + java.util.Arrays.toString(getLocations()) + ", query = " + _querySpec + ", fields = " + _fieldSpec
            + ", sort = " + _sortSpec + ", limit = " + _limit + ", skip = " + _skip + "}");

    objIn.close();
}

From source file:com.kylinolap.dict.DateStrDictionary.java

@Override
public void readFields(DataInput in) throws IOException {
    String pattern = in.readUTF();
    int baseId = in.readInt();
    init(pattern, baseId);//  ww w.ja va2  s .  c  o m
}

From source file:com.davidgildeh.hadoop.input.simpledb.SimpleDBInputSplit.java

/**
 * Read the Split from the serialised Split file to initialise InputSplit for
 * processing//ww w.  jav  a  2  s .c om
 * 
 * @param input         The input stream of file to read from
 * @throws IOException 
 */
public void readFields(DataInput input) throws IOException {

    startRow = input.readLong();
    endRow = input.readLong();
    splitToken = input.readUTF();
    if (splitToken.equals("NULL")) {
        splitToken = null;
    }
}