Examples of writeWord()


Examples of net.agkn.hll.serialization.IWordSerializer.writeWord()

                    schemaVersion.getSerializer(type, Long.SIZE, explicitStorage.size());

                final long[] values = explicitStorage.toLongArray();
                Arrays.sort(values);
                for(final long value : values) {
                    serializer.writeWord(value);
                }

                bytes = serializer.getBytes();
                break;
            }
View Full Code Here

Examples of net.agkn.hll.serialization.IWordSerializer.writeWord()

                Arrays.sort(indices);
                for(final int registerIndex : indices) {
                    final long registerValue = sparseProbabilisticStorage.get(registerIndex);
                    // pack index and value into "short word"
                    final long shortWord = ((registerIndex << regwidth) | registerValue);
                    serializer.writeWord(shortWord);
                }

                bytes = serializer.getBytes();
                break;
            }
View Full Code Here

Examples of net.bnubot.core.BNetOutputStream.writeWord()

    byte data[] = ((ByteArrayOutputStream)this.out).toByteArray();
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    BNetOutputStream sckout = new BNetOutputStream(baos);
   
    try {
      sckout.writeWord(data.length + 3);
      sckout.writeByte(packetId);
      sckout.write(data);
    } catch(IOException e) {
      e.printStackTrace();
      System.exit(1);
View Full Code Here

Examples of net.bnubot.core.BNetOutputStream.writeWord()

    }
   
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    BNetOutputStream os = new BNetOutputStream(baos);
    os.writeByte(packetId);
    os.writeWord(packetLength);
    os.write(data);
   
    if(packetLog)
      Out.info("MCPPacketReader", "RECV MCP\n" + HexDump.hexDump(baos.toByteArray()));
  }
View Full Code Here

Examples of net.bnubot.core.BNetOutputStream.writeWord()

   
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    BNetOutputStream os = new BNetOutputStream(baos);
    os.writeByte(0xFF);
    os.writeByte(packetId);
    os.writeWord(packetLength);
    os.write(data);
   
    if(packetLog)
      Out.info(this.getClass().getName(), "RECV\n" + HexDump.hexDump(baos.toByteArray()));
  }
View Full Code Here

Examples of net.bnubot.core.BNetOutputStream.writeWord()

    }
   
    try {
      sckout.writeByte(0xFF);
      sckout.writeByte(packetId);
      sckout.writeWord(data.length + 4);
      sckout.write(data);
    } catch(IOException e) {
      e.printStackTrace();
      System.exit(1);
    }
View Full Code Here

Examples of net.bnubot.util.BNetOutputStream.writeWord()

    ) {
      //FTP
      os.writeByte(0x02);

      //File request
      os.writeWord(32 + fileName.length() + 1);
      os.writeWord(0x100);    // Protocol version
      os.writeDWord(PlatformIDs.PLATFORM_IX86)// Platform ID
      os.writeDWord(cs.product.getDword())// Product ID
      os.writeDWord(0);    // Banners ID
      os.writeDWord(0);    // Banners File Extension
View Full Code Here

Examples of net.bnubot.util.BNetOutputStream.writeWord()

      //FTP
      os.writeByte(0x02);

      //File request
      os.writeWord(32 + fileName.length() + 1);
      os.writeWord(0x100);    // Protocol version
      os.writeDWord(PlatformIDs.PLATFORM_IX86)// Platform ID
      os.writeDWord(cs.product.getDword())// Product ID
      os.writeDWord(0);    // Banners ID
      os.writeDWord(0);    // Banners File Extension
      os.writeDWord(0);    // File position
View Full Code Here

Examples of net.bnubot.util.BNetOutputStream.writeWord()

  public void sendPacket(OutputStream out) throws IOException, SocketException {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();

    try (BNetOutputStream sckout = new BNetOutputStream(baos)) {
      byte raw_data[] = ((ByteArrayOutputStream)this.out).toByteArray();
      sckout.writeWord(raw_data.length + 3);
      sckout.writeByte(packetId.ordinal());
      sckout.write(raw_data);
    } catch(IOException e) {
      Out.fatalException(e);
    }
View Full Code Here

Examples of net.bnubot.util.BNetOutputStream.writeWord()

      String msg = "RECV " + packetId.name();
      if(Out.isDebug()) {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        try (BNetOutputStream os = new BNetOutputStream(baos)) {
          os.writeByte(packetId.ordinal());
          os.writeWord(packetLength);
          os.write(data);
        }
        msg += "\n" + HexDump.hexDump(baos.toByteArray());
      }
      Out.debugAlways(getClass(), msg);
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.