Package net.bnubot.util

Examples of net.bnubot.util.BNetInputStream.available()


        byte[] valueStr = is.readNTBytes();

        Out.debug(getClass(), "MPQ: " + mpqFileName);

        byte extraData[] = null;
        if (is.available() == 0x80) {
          extraData = new byte[0x80];
          is.read(extraData, 0, 0x80);
        }
        assert (is.available() == 0);
View Full Code Here


        byte extraData[] = null;
        if (is.available() == 0x80) {
          extraData = new byte[0x80];
          is.read(extraData, 0, 0x80);
        }
        assert (is.available() == 0);

        // Hash the CD key
        byte keyHash[] = null;
        byte keyHash2[] = null;
        if (nlsRevision != null) {
View Full Code Here

      case SID_REPORTVERSION:
      case SID_AUTH_CHECK: {
        int result = is.readDWord();
        String extraInfo = is.readNTString();
        assert (is.available() == 0);

        if (pr.packetId == BNCSPacketId.SID_AUTH_CHECK) {
          if (result != 0) {
            switch (result) {
            case 0x0100:
View Full Code Here

         */
        int status = is.readDWord();
        byte server_M2[] = new byte[20];
        is.read(server_M2, 0, 20);
        String additionalInfo = null;
        if (is.available() != 0)
          additionalInfo = is.readNTStringUTF8();

        switch (status) {
        case 0x00:
          break;
View Full Code Here

      os.writeDWord(0);    // File position
      os.writeQWord(0);    // Filetime
      os.writeNTString(fileName);

      long startTime = System.currentTimeMillis();
      while(is.available() == 0) {
        if(s.isClosed() || (System.currentTimeMillis() - startTime) > 500)
          throw new Exception("BNFTP download failed");
      }

      //Receive the file
View Full Code Here

      vcr.exeVersion = bnlsIn.readDWord();
      vcr.exeHash = bnlsIn.readDWord();
      vcr.exeInfo = bnlsIn.readNTBytes();
      bnlsIn.readDWord(); // cookie
      bnlsIn.readDWord(); // verbyte
      assert (bnlsIn.available() == 0);

      Out.info(getClass(), "Recieved version check from BNLS.");

      if((vcr.exeVersion == 0)
      || (vcr.exeHash == 0)
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.