Examples of readFields()


Examples of edu.umd.cloud9.io.pair.PairOfLongFloat.readFields()

    origPair.write(dataOut);

    PairOfLongFloat pair = new PairOfLongFloat();

    pair.readFields(new DataInputStream(new ByteArrayInputStream(bytesOut.toByteArray())));

    assertEquals(1L, pair.getLeftElement());
    assertTrue(pair.getRightElement() == 2.0f);
  }
View Full Code Here

Examples of edu.umd.cloud9.io.pair.PairOfLongInt.readFields()

    origPair.write(dataOut);

    PairOfLongInt pair = new PairOfLongInt();

    pair.readFields(new DataInputStream(new ByteArrayInputStream(bytesOut.toByteArray())));

    assertEquals(1L, pair.getLeftElement());
    assertEquals(2L, pair.getRightElement());
  }
View Full Code Here

Examples of edu.umd.cloud9.io.pair.PairOfLongString.readFields()

    origPair.write(dataOut);

    PairOfLongString pair = new PairOfLongString();

    pair.readFields(new DataInputStream(new ByteArrayInputStream(bytesOut.toByteArray())));

    assertEquals("hi", pair.getRightElement());
    assertTrue(pair.getLeftElement() == 2L);
  }
View Full Code Here

Examples of edu.umd.cloud9.io.pair.PairOfLongs.readFields()

    origPair.write(dataOut);

    PairOfLongs pair = new PairOfLongs();

    pair.readFields(new DataInputStream(new ByteArrayInputStream(bytesOut.toByteArray())));

    assertEquals(1L, pair.getLeftElement());
    assertEquals(2L, pair.getRightElement());
  }
View Full Code Here

Examples of edu.umd.cloud9.io.pair.PairOfStringFloat.readFields()

    origPair.write(dataOut);

    PairOfStringFloat pair = new PairOfStringFloat();

    pair.readFields(new DataInputStream(new ByteArrayInputStream(bytesOut.toByteArray())));

    assertEquals("hi", pair.getLeftElement());
    assertTrue(pair.getRightElement() == 2.0f);
  }
View Full Code Here

Examples of edu.umd.cloud9.io.pair.PairOfStringInt.readFields()

    origPair.write(dataOut);

    PairOfStringInt pair = new PairOfStringInt();

    pair.readFields(new DataInputStream(new ByteArrayInputStream(bytesOut.toByteArray())));

    assertEquals("hi", pair.getLeftElement());
    assertEquals(2, pair.getRightElement());
  }
View Full Code Here

Examples of edu.umd.cloud9.io.pair.PairOfStringLong.readFields()

    origPair.write(dataOut);

    PairOfStringLong pair = new PairOfStringLong();

    pair.readFields(new DataInputStream(new ByteArrayInputStream(bytesOut.toByteArray())));

    assertEquals("hi", pair.getLeftElement());
    assertEquals(2L, pair.getRightElement());
  }
View Full Code Here

Examples of edu.umd.cloud9.io.pair.PairOfStrings.readFields()

    origPair.write(dataOut);

    PairOfStrings pair = new PairOfStrings();

    pair.readFields(new DataInputStream(new ByteArrayInputStream(bytesOut.toByteArray())));

    assertEquals("hi", pair.getLeftElement());
    assertEquals("there", pair.getRightElement());
  }
View Full Code Here

Examples of edu.umd.cloud9.webgraph.data.AnchorText.readFields()

    }
   
    DataInputStream in = new DataInputStream(new ByteArrayInputStream(bstream.toByteArray()));
    AnchorText readAnchor = new AnchorText();
    try {
      readAnchor.readFields(in);
      in.close();
    }catch(Exception e) {
    }
   
    assertEquals(anchor3, readAnchor);
View Full Code Here

Examples of edu.umd.hooka.VocabularyWritable.readFields()

    org.apache.hadoop.conf.Configuration conf = new org.apache.hadoop.conf.Configuration(job);
    FileSystem fileSys = FileSystem.get(conf);

    DataInput in = new DataInputStream(new BufferedInputStream(fileSys.open(path)));
    VocabularyWritable at = new VocabularyWritable();
    at.readFields(in);

    return at;
  }

  static public Vocab loadVocab(Path path, FileSystem fileSys) throws IOException {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.