Examples of fromByteArray()


Examples of com.jacob.com.SafeArray.fromByteArray()

    System.out.println("Byte");
    SafeArray bba = new SafeArray(Variant.VariantByte, 4);
    System.out.println("elem size:" + bba.getElemSize());
    byte bback[] = new byte[] { 0x1, 0x2, 0x3, 0x4 };
    printArray(bback);
    bba.fromByteArray(bback);
    bback = bba.toByteArray();
    printArray(bback);

    byte bb4[] = new byte[4];
    bba.getBytes(0, 4, bb4, 0);
View Full Code Here

Examples of com.sshtools.j2ssh.subsystem.SubsystemMessage.fromByteArray()

            Integer id = new Integer((int) msgdata[0] & 0xFF);

            if (messages.containsKey(id)) {
                Class cls = (Class) messages.get(id);
                SubsystemMessage msg = (SubsystemMessage) cls.newInstance();
                msg.fromByteArray(msgdata);
                log.info("Received message " + msg.getMessageName());

                return msg;
            } else {
                throw new InvalidMessageException("Unrecognised message id " +
View Full Code Here

Examples of com.sshtools.j2ssh.subsystem.SubsystemMessage.fromByteArray()

            Integer id = new Integer((int) msgdata[0] & 0xFF);

            if (messages.containsKey(id)) {
                Class cls = (Class) messages.get(id);
                SubsystemMessage msg = (SubsystemMessage) cls.newInstance();
                msg.fromByteArray(msgdata);
                log.info("Received message " + msg.getMessageName());

                return msg;
            } else {
                throw new InvalidMessageException("Unrecognised message id " +
View Full Code Here

Examples of net.sf.cram.encoding.HuffmanIntegerEncoding.fromByteArray()

    System.out.println(Arrays.toString(values));
    System.out.println(Arrays.toString(lens));

    EncodingParams params = HuffmanIntegerEncoding.toParam(values, lens);
    HuffmanIntegerEncoding e = new HuffmanIntegerEncoding();
    e.fromByteArray(params.params);

    BitCodec<Integer> codec = e.buildCodec(null, null);

    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    DefaultBitOutputStream bos = new DefaultBitOutputStream(baos);
View Full Code Here

Examples of net.sf.cram.encoding.HuffmanIntegerEncoding.fromByteArray()

          c.calculate();

          EncodingParams param = HuffmanIntegerEncoding.toParam(
              c.values(), c.bitLens());
          HuffmanIntegerEncoding he = new HuffmanIntegerEncoding();
          he.fromByteArray(param.params);
          EncodingLengthCalculator lc = new EncodingLengthCalculator(
              he);
          for (Integer value : dictionary.keySet())
            lc.add(value, dictionary.get(value).value);
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.