Examples of ByteString


Examples of com.linkedin.data.ByteString

                VectorClock updatedVC = RestUtils.deserializeVectorClock(serializedUpdatedVC);
                VectorClock originalVC = (VectorClock) value.getVersion();
                originalVC.copyFromVectorClock(updatedVC);
            }

            final ByteString entity = response.getEntity();
            if(entity == null) {
                if(logger.isDebugEnabled()) {
                    logger.debug("Empty response !");
                }
            }
View Full Code Here

Examples of com.linkedin.data.ByteString

                // This will block
                RestResponse response = f.get();

                // Parse the response
                final ByteString entity = response.getEntity();

                String contentType = response.getHeader(CONTENT_TYPE);
                if(entity != null) {
                    if(contentType.equalsIgnoreCase(MULTIPART_CONTENT_TYPE)) {
View Full Code Here

Examples of com.linkedin.data.ByteString

                                                         .getOperationTimeout(VoldemortOpCode.GET_VERSION_OP_CODE));

            rb.setHeader(RestMessageHeaders.X_VOLD_GET_VERSION, "true");

            RestResponse response = fetchGetResponse(rb, timeoutStr);
            final ByteString entity = response.getEntity();
            if(entity != null) {
                resultList = parseGetVersionResponse(entity);
            } else {
                if(logger.isDebugEnabled()) {
                    logger.debug("Did not get any response!");
View Full Code Here

Examples of com.simulity.api.hubb.ByteString

                    }
                   
                    if (fortune != null) {
                        if (0 != fortune.length()) {

                            ByteString bs = null;

                            try {

                                // regex by alex to replace any patters of > 2 spaces with 1 space
                               
                                fortune = fortune.trim().replaceAll(" +", " ");

                                if (fortune.length() > 70) {
                                    fortune = fortune.substring(0, 67) + "...";
                                }

                                byte[] fortuneAscii = fortune.getBytes("ASCII");
                                bs = new ByteString(fortuneAscii);
                            } catch (UnsupportedEncodingException ex) {
                                Logger.getLogger(FortuneServer.class.getName()).log(Level.SEVERE, null, ex);
                                doRequestLogic(requestParameters);
                            }


                            if (bs == null) {
                                doRequestLogic(requestParameters);
                            }

                            // transmit the fortune message to the handset
                            CardSettings cs = new CardSettings(
                                    "0000",
                                    "NONE",
                                    "NONE",
                                    "1",
                                    "NONE",
                                    "NONE",
                                    "1",
                                    "555559",
                                    "0000000000",
                                    "0",
                                    "0",
                                    requestParameters.get("msisdn")[0]);
                           
                            String toHex = bs.toHex();
                           
                            toHex = toHex.replace("6E756C6C", "");
                           
                            String transmit = "0A010000" +
                                    ((toHex.length() / 2 < 0x0F) ? "0" + Integer.toHexString(toHex.length() / 2) : Integer.toHexString(toHex.length() / 2)) + toHex;
View Full Code Here

Examples of erjang.beam.repr.Operands.ByteString

        return new Insn.Y(opcode, y);
      }

      case bs_put_string:
      {
        ByteString bin = readBytestringRef();
        return new Insn.By(opcode, bin);
      }

      //---------- 2-ary ----------
      case allocate:
      case allocate_zero:
      case trim:
      case apply_last:
      {
        int i1 = readCodeInteger();
        int i2 = readCodeInteger();
        return new Insn.II(opcode, i1, i2);
      }

      case test_heap:
      {
        AllocList al = readAllocList();
        int i2 = readCodeInteger();
        return new Insn.WI(opcode, al, i2);
      }

      case call:
      case call_only:
      {
        int i1 = readCodeInteger();
        Label label = readLabel();
        return new Insn.IL(opcode, i1, label,
                   functionAtLabel(label.nr));
      }

      case call_ext:
      case call_ext_only:
      {
        int i1 = readCodeInteger();
        int ext_fun_ref = readCodeInteger();
        return new Insn.IE(opcode, i1, extFun(ext_fun_ref));
      }

      case bs_save2:
      case bs_restore2:
      {
        DestinationOperand dest = readDestination();

        int i2;
        if ((peekTag() & 0x7) == ATOM4_TAG) {
          if (readAtom().getEAtom() != START_ATOM)
            throw new IOException("integer or 'start' expected");
          i2 = -1;
        } else i2 = readCodeInteger();
        return new Insn.DI(opcode, dest, i2, true);
      }

      case move:
      case fmove:
      case fconv:
      {
        SourceOperand src = readSource();
        DestinationOperand dest = readDestination();
        return new Insn.SD(opcode, src, dest);
      }

      case put_tuple:
      {
        int i1 = readCodeInteger();
        DestinationOperand dest = readDestination();
        return new Insn.ID(opcode, i1, dest);
      }

      case loop_rec:
      {
        Label label = readLabel();
        DestinationOperand dest = readDestination();
        return new Insn.LD(opcode, label, dest);
      }

      case K_try:
      case K_catch:
      {
        YReg y = readYReg();
        Label label = readLabel();
        return new Insn.YL(opcode, y, label);
      }

      case is_integer:
      case is_float:
      case is_number:
      case is_atom:
      case is_pid:
      case is_reference:
      case is_port:
      case is_nil:
      case is_binary:
      case is_list:
      case is_nonempty_list:
      case is_tuple:
      case is_function:
      case is_boolean:
      case is_bitstr:
      {
        Label label = readLabel();
        DestinationOperand src = readDestination();
        return new Insn.LD(opcode, label, src, true);
      }

      case wait_timeout:
      {
        Label label = readLabel();
        SourceOperand src = readSource();
        return new Insn.LS(opcode, label, src, false);
      }

      case raise:
      {
        SourceOperand src1 = readSource();
        SourceOperand src2 = readSource();
        return new Insn.SS(opcode, src1, src2);
      }

      case put_string:
      {
        ByteString bin = readBytestringRef();
        DestinationOperand dest = readDestination();
        return new Insn.ByD(opcode, bin, dest);
      }

      //---------- 3-ary ----------
View Full Code Here

Examples of erjang.beam.repr.Operands.ByteString

    return new BitString(bitstring(start,bits));
    }
    public ByteString readBytestringRef() throws IOException {
    int bytes  = readCodeInteger();
    int start = readCodeInteger();
    return new ByteString(string(start,bytes));
    }
View Full Code Here

Examples of mondrian.util.ByteString

            }
            for (String c : compoundPredicates) {
                hashSB.append(c);
            }
            this.uniqueID =
                new ByteString(Util.digestSha256(hashSB.toString()));
        }
        return uniqueID;
    }
View Full Code Here

Examples of net.hydromatic.avatica.ByteString

          (bitString.getBitCount() % 8) == 0,
          "incomplete octet");

      // An even number of hexits (e.g. X'ABCD') makes whole number
      // of bytes.
      ByteString byteString = new ByteString(bitString.getAsByteArray());
      return rexBuilder.makeBinaryLiteral(byteString);
    case SYMBOL:
      return rexBuilder.makeFlag((Enum) value);
    case TIMESTAMP:
      return rexBuilder.makeTimestampLiteral(
View Full Code Here

Examples of net.hydromatic.avatica.ByteString

    case DOUBLE:
      BigDecimal d = new BigDecimal(literal);
      return new RexLiteral(d, type, typeName);
    case BINARY:
      byte[] bytes = ConversionUtil.toByteArrayFromString(literal, 16);
      return new RexLiteral(new ByteString(bytes), type, typeName);
    case NULL:
      return new RexLiteral(null, type, typeName);
    case INTERVAL_DAY_TIME:
      long millis =
          SqlParserUtil.intervalToMillis(
View Full Code Here

Examples of net.hydromatic.avatica.ByteString

    if (value.length() <= dataType.getPrecision()) {
      // No truncation required.
      return 0;
    }
    ByteString truncated = value.substring(0, dataType.getPrecision());
    coordinate = factory.getRexBuilder().makeBinaryLiteral(truncated);

    // Truncation is always "down" in coordinate space, so rounding
    // compensation is always "up".
    return 1;
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.