Package java.util

Examples of java.util.Scanner.nextLong()


    try {
      runCmd(shell, "-count", path);
      results = bytes.toString();
      in = new Scanner(results);
      assertEquals(dirs, in.nextLong());
      assertEquals(files, in.nextLong());
    } finally {
      if (in!=null) in.close();
      IOUtils.closeStream(out);
      System.setOut(oldOut);
      System.out.println("results:\n" + results);
View Full Code Here


      errors = 0;
      s = new Scanner (new FileReader (this.aktFile));
      i = 0;
      while (s.hasNextLong ())
  {
    tmp = s.nextLong ();
    if (tmp != numbers[i])
      {
        errors++;
        this.myHarness.fail ("Readable : nextLong() -> " + tmp +
           " != " + numbers[i]);
View Full Code Here

      errors = 0;
      s = new Scanner ((new FileInputStream (this.aktFile)).getChannel ());
      i = 0;
      while (s.hasNextLong ())
  {
    tmp = s.nextLong ();
    if (tmp != numbers[i])
      {
        errors++;
        this.myHarness.fail ("ReadableByteChanel : nextLong() -> " +
           tmp + " != " + numbers[i]);
View Full Code Here

    errors = 0;
    s = new Scanner (this.aktFile, charSets[aktCS]);
    i = 0;
    while (s.hasNextLong ())
      {
        tmp = s.nextLong ();
        if (tmp != numbers[i])
    {
      errors++;
      this.myHarness.fail (aktName + " : nextLong() -> " + tmp +
               " != " + numbers[i]);
View Full Code Here

             getBytes ()),
         charSets[aktCS]);
    i = 0;
    while (s.hasNextLong ())
      {
        tmp = s.nextLong ();
        if (tmp != numbers[i])
    {
      errors++;
      this.myHarness.fail (aktName + " : nextLong() -> " + tmp +
               " != " + numbers[i]);
View Full Code Here

      new Scanner ((new FileInputStream (this.aktFile)).getChannel (),
         charSets[aktCS]);
    i = 0;
    while (s.hasNextLong ())
      {
        tmp = s.nextLong ();
        if (tmp != numbers[i])
    {
      errors++;
      this.myHarness.fail (aktName + " : nextLong() -> " + tmp +
               " != " + numbers[i]);
View Full Code Here

      Scanner s = new Scanner (aktFile);
      i = 0;
      while (s.hasNextLong ())
  {
    tmp = s.nextLong ();
    this.myHarness.check (tmp, numbers[i],
        "nextLong() -> " + tmp + " != " + numbers[i]);
    i++;
  }
      this.myHarness.check (i, numbers.length,
View Full Code Here

    myHarness.check(s.hasNextShort(16), "hasNextShort(16)");
    myHarness.check(s.nextShort(16), 32767, "nextShort is 32767");
    myHarness.check(s.hasNextInt(16), "hasNextInt(16)");
    myHarness.check(s.nextInt(16), 1329545071, "nextInt is 1329545071");
    myHarness.check(s.hasNextLong(16), "hasNextLong(16)");
    myHarness.check(s.nextLong(16), 69540603232238L, "nextLong is 69540603232238");
    myHarness.check(s.hasNextBigInteger(16), "hasNextBigInteger(16)");
    myHarness.check(s.nextBigInteger(16), BigInteger.valueOf(5496130961322L),
        "nextBigInteger is 5496130961322");

    s = new Scanner (testStr).useRadix (16);
View Full Code Here

    myHarness.check(s.hasNextShort(), "hasNextShort()");
    myHarness.check(s.nextShort(), 32767, "nextShort is 32767");
    myHarness.check(s.hasNextInt(), "hasNextInt()");
    myHarness.check(s.nextInt(), 1329545071, "nextInt is 1329545071");
    myHarness.check(s.hasNextLong(), "hasNextLong()");
    myHarness.check(s.nextLong(), 69540603232238L, "nextLong is 69540603232238");
    myHarness.check(s.hasNextBigInteger(), "hasNextBigInteger()");
    myHarness.check(s.nextBigInteger(), BigInteger.valueOf(5496130961322L),
        "nextBigInteger is 5496130961322");

  }
View Full Code Here

    String results = null;
    try {
      runCmd(shell, "-count", path);
      results = bytes.toString();
      in = new Scanner(results);
      assertEquals(dirs, in.nextLong());
      assertEquals(files, in.nextLong());
    } finally {
      if (in!=null) in.close();
      IOUtils.closeStream(out);
      System.setOut(oldOut);
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.