DataInput readDouble - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for DataInput readDouble method.

This code example shows how to use the following methods:readDouble, readInt
    return loChild.toString() + ',' + hiChild.toString(); 
  } 
   
  @Override 
  public void readFields(DataInput in) throws IOException {
    attr = in.readInt();
    split = in.readDouble();
    loChild = Node.read(in);
    hiChild = Node.read(in);
  } 
   
  @Override 
  protected void writeNode(DataOutput out) throws IOException {
    out.writeInt(attr);
    out.writeDouble(split);
    loChild.write(out);
    hiChild.write(out);
  } 
} 
7
CodeRank
This code example shows how to use the following methods:readDouble
        return c;
    } 
 
    public double readDouble() throws IOException 
    { 
        double d = source.readDouble();
        bytesRead += 8;
        return d;
    } 
 
    public float readFloat() throws IOException 
    { 
        float f = source.readFloat();
        bytesRead += 4;
        return f;
    } 
 
    public void readFully(byte[] b, int off, int len) throws IOException
    { 
        source.readFully(b, off, len);
7
CodeRank
This code example shows how to use the following methods:readDouble, readInt, readUTF
    this.type = t;
  } 
   
  @Override 
  public void readFields(DataInput arg0) throws IOException {
    this.i = arg0.readInt();
    this.j = arg0.readInt();
    this.value = arg0.readDouble();
    this.type = arg0.readUTF();
  } 
 
  @Override 
  public void write(DataOutput arg0) throws IOException {
    arg0.writeInt(i);
    arg0.writeInt(j);
    arg0.writeDouble(value);
    arg0.writeUTF(type);
  } 
 
} 
7
CodeRank
This code example shows how to use the following methods:readBoolean, readByte, readChar, readDouble, readFloat
        } 
 
        public void readExternal(ObjectInput in)
            throws IOException, ClassNotFoundException 
        { 
            z = in.readBoolean();
            b = in.readByte();
            c = in.readChar();
            s = in.readShort();
            i = in.readInt();
            f = in.readFloat();
            j = in.readLong();
            d = in.readDouble();
            str = (String) in.readObject();
            parent = in.readObject();
            left = in.readObject();
            right = in.readObject();
        } 
    } 
 

7
CodeRank
This code example shows how to use the following methods:readDouble, readInt
  public void readFields(DataInput dataInput) throws IOException {
    if (centroid == null) {
      centroid = read(dataInput);
      return; 
    } 
    centroid.setIndex(dataInput.readInt());
    centroid.setWeight(dataInput.readDouble());
    centroid.assign(VectorWritable.readVector(dataInput));
  } 
 
  public static Centroid read(DataInput dataInput) throws IOException {
    int index = dataInput.readInt();
    double weight = dataInput.readDouble();
    Vector v = VectorWritable.readVector(dataInput);
    return new Centroid(index, v, weight);
  } 
 
  @Override 
  public boolean equals(Object o) { 
    if (this == o) {
7
CodeRank
This code example shows how to use the following methods:readDouble, readFully, readInt
    out.writeDouble(weight);
  } 
   
  @Override 
  public void readFields(DataInput in) throws IOException {
    this.bytes = new byte[in.readInt()];
    in.readFully(this.bytes);
    weight = in.readDouble();
  } 
   
  // Comparable 
  @Override 
  public int compareTo(Key other) {
    int result = this.bytes.length - other.getBytes().length;
    for (int i = 0; result == 0 && i < bytes.length; i++) {
      result = this.bytes[i] - other.bytes[i];
    } 
     
    if (result == 0) {
      result = Double.valueOf(this.weight - other.weight).intValue();
8
CodeRank
This code example shows how to use the following methods:readDouble, readFully, readInt
    out.writeDouble(weight);
  } 
   
  @Override 
  public void readFields(DataInput in) throws IOException {
    this.bytes = new byte[in.readInt()];
    in.readFully(this.bytes);
    weight = in.readDouble();
  } 
   
  // Comparable 
  @Override 
  public int compareTo(Key other) {
    int result = this.bytes.length - other.getBytes().length;
    for (int i = 0; result == 0 && i < bytes.length; i++) {
      result = this.bytes[i] - other.bytes[i];
    } 
     
    if (result == 0) {
      result = Double.valueOf(this.weight - other.weight).intValue();
6
CodeRank
This code example shows how to use the following methods:readDouble, readInt
    this.value = v;
  } 
 
  @Override 
  public void readFields(DataInput in) throws IOException {
    this.key = in.readInt();
    this.value = in.readDouble();
  } 
 
  @Override 
  public void write(DataOutput out) throws IOException {
    out.writeInt(key);
    out.writeDouble(value);
  } 
 
  public int getKey() { 
    return key;
  } 
 
  public double getValue() { 
6
CodeRank
This code example shows how to use the following methods:readBoolean, readDouble, readFloat, readInt, readLong
        out.writeDouble(fieldDouble);
        out.writeUTF(fieldString);
    } 
 
    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
        fieldInt = in.readInt();
        fieldBoolean = in.readBoolean();
        fieldLong = in.readLong();
        fieldFloat = in.readFloat();
        fieldDouble = in.readDouble();
        fieldString = in.readUTF();
    } 
 
} 
6
CodeRank
This code example shows how to use the following methods:readDouble, readFloat
 *  
 */ 
public class UninterpolatedInfo implements Writable { 
 
	private int wordId; 
	private double prob; 
	private double interpWeight; 
 
	public double getUninterpolatedProb() { 
		return prob; 
	} 
 
	public double getInterpolationWeight() { 
		return interpWeight; 
	} 
 
	public int getWord() { 
		return wordId; 
	} 
 

6
CodeRank
readDouble Method Overview
Reads eight input bytes and returns a double value.
See Code Examples for other Java 8 DataInput Methods: