Examples of readWord()


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

        case PACKET_COMMAND: {
          // PROTOCOL VIOLATION!
          int err = is.readDWord();
          byte id = is.readByte();
          int lenOffending = is.readWord();
          int lenUnprocessed = is.readWord();
          dispatchRecieveError("Protocol violation: err=" + err + ", packet=" + BotNetPacketId.values()[id].name() + ", offending packet len=" + lenOffending + ", unprocessed data len=" + lenUnprocessed);
          disconnect(ConnectionState.LONG_PAUSE_BEFORE_CONNECT);
          break;
        }
        default:
View Full Code Here

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

      is.skip(1);              // ColorMapType
      byte imageType = is.readByte();    // run-length true-color image types = 0x0A
      is.skip(5);              // ColorMapSpecification - color map data
      is.skip(2)//int xOrigin = is.readWord();
      is.skip(2)//int yOrigin = is.readWord();
      int width = is.readWord();
      int height = is.readWord();
      byte depth = is.readByte();      // 24 bit depth is good
      /*byte descriptor =*/ is.readByte()// bits 5 and 4 (00110000) specify the corner to start coloring pixels - 00=bl, 01=br, 10=tl, 11=tr
      is.skip(infoLength)//String info = is.readFixedLengthString(infoLength);

View Full Code Here

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

      byte imageType = is.readByte();    // run-length true-color image types = 0x0A
      is.skip(5);              // ColorMapSpecification - color map data
      is.skip(2)//int xOrigin = is.readWord();
      is.skip(2)//int yOrigin = is.readWord();
      int width = is.readWord();
      int height = is.readWord();
      byte depth = is.readByte();      // 24 bit depth is good
      /*byte descriptor =*/ is.readByte()// bits 5 and 4 (00110000) specify the corner to start coloring pixels - 00=bl, 01=br, 10=tl, 11=tr
      is.skip(infoLength)//String info = is.readFixedLengthString(infoLength);

      if(imageType != 0x0A)
View Full Code Here

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

        seed);

    byte u = is.readByte();
    int cookie = is.readDWord();
    byte result = is.readByte();
    short dataLen = is.readWord();
    if(u != 0)
      throw new IOException("wrong useage");
    if(cookie != cookie_out)
      throw new IOException("wrong cookie");
    if(result != 0)
View Full Code Here

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

    BNetInputStream is = bnls.sendWarden1(cookie_out, payload);

    byte u = is.readByte();
    int cookie = is.readDWord();
    byte result = is.readByte();
    short dataLen = is.readWord();
    byte[] data = new byte[dataLen];
    is.read(data);

    if(u != 1)
      throw new IOException("wrong useage");
View Full Code Here

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

  public BNLSPacketReader(InputStream rawis) throws IOException {
    // Operates on a socket, which we don't want to close; suppress the warning
    @SuppressWarnings("resource")
    BNetInputStream is = new BNetInputStream(rawis);

    packetLength = is.readWord() & 0x0000FFFF;
    packetId = BNLSPacketId.values()[is.readByte() & 0x000000FF];
    assert(packetLength >= 3);

    data = new byte[packetLength-3];
    for(int i = 0; i < packetLength-3; i++)
View Full Code Here

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

             * (DWORD)     Seconds since January 1 00:00:00 UTC 1970
             * (STRING)    Name
             * (WORD)     Flags
             * (STRING)    Character statstring
             */
            is.readWord();
            is.readDWord();
            int numChars = is.readWord();

            List<MCPCharacter> chars = new ArrayList<MCPCharacter>(numChars);

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.