Package edu.umd.cloud9.io.pair

Examples of edu.umd.cloud9.io.pair.PairOfStringLong.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


    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

    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

    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

    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

    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

    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

    }
   
    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

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.