Package net.bnubot.core

Examples of net.bnubot.core.BNetInputStream.skip()


  private static BNetIcon[] readIconsDotBni(File f) {
    try {
      //Out.info(this.getClass().getName(), "Reading " + f.getName());
     
      BNetInputStream is = new BNetInputStream(new FileInputStream(f));
      is.skip(4); //int headerSize = is.readDWord();
      int bniVersion = is.readWord();
      is.skip(2)// Alignment Padding (unused)
      int numIcons = is.readDWord();
      is.skip(4)//int dataOffset = is.readDWord();
     
View Full Code Here


      //Out.info(this.getClass().getName(), "Reading " + f.getName());
     
      BNetInputStream is = new BNetInputStream(new FileInputStream(f));
      is.skip(4); //int headerSize = is.readDWord();
      int bniVersion = is.readWord();
      is.skip(2)// Alignment Padding (unused)
      int numIcons = is.readDWord();
      is.skip(4)//int dataOffset = is.readDWord();
     
      if(bniVersion != 1)
        throw new Exception("Unknown BNI version");
View Full Code Here

      BNetInputStream is = new BNetInputStream(new FileInputStream(f));
      is.skip(4); //int headerSize = is.readDWord();
      int bniVersion = is.readWord();
      is.skip(2)// Alignment Padding (unused)
      int numIcons = is.readDWord();
      is.skip(4)//int dataOffset = is.readDWord();
     
      if(bniVersion != 1)
        throw new Exception("Unknown BNI version");
     
      //Out.info(this.getClass().getName(), "Reading " + numIcons + " icons in format " + bniVersion + " from offset " + dataOffset);
View Full Code Here

        //Out.info(this.getClass().getName(), icon.toString());
      }
     
      //Image in targa format
      byte infoLength = is.readByte();
      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();
View Full Code Here

     
      //Image in targa format
      byte infoLength = is.readByte();
      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
View Full Code Here

      //Image in targa format
      byte infoLength = is.readByte();
      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
View Full Code Here

      byte infoLength = is.readByte();
      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

      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)
        throw new Exception("Unknown image type");
      if(depth != 24)
        throw new Exception("Unknown depth");
View Full Code Here

        case BNCSCommandIDs.SID_AUTH_INFO:
        case BNCSCommandIDs.SID_STARTVERSIONING: {
          if(pr.packetId == BNCSCommandIDs.SID_AUTH_INFO) {
            nlsRevision = is.readDWord();
            serverToken = is.readDWord();
            is.skip(4)//int udpValue = is.readDWord();
          }
          long MPQFileTime = is.readQWord();
          String MPQFileName = is.readNTString();
          String ValueStr = is.readNTString();
         
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.