Examples of binaryValue()


Examples of com.ericsson.otp.erlang.OtpErlangBinary.binaryValue()

        final OtpErlangObject logEvent = t.elementAt(3);
        String ss = "";
        if (t.arity() == 5) {
            final OtpErlangTuple backtrace_0 = (OtpErlangTuple) t.elementAt(4);
            final OtpErlangBinary backtrace = (OtpErlangBinary) backtrace_0.elementAt(1);
            ss = new String(backtrace.binaryValue());
        }
        try {
            ErlLogger.getInstance().erlangLog(module.atomValue() + ".erl",
                    line.uIntValue(), level.atomValue().toUpperCase(), "%s %s",
                    logEvent.toString(), ss);
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpErlangBinary.binaryValue()

        List<ErlToken> toks = null;
        if (Util.isOk(t1)) {
            if (t1.elementAt(1) instanceof OtpErlangBinary) {
                final OtpErlangBinary b = (OtpErlangBinary) t1.elementAt(1);
                final byte[] bytes = b.binaryValue();
                toks = new ArrayList<ErlToken>(bytes.length / 10);
                for (int i = 0; i < bytes.length; i += 10) {
                    final ErlToken tk = new ErlToken(bytes, i, offset);
                    toks.add(tk);
                }
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpErlangBinary.binaryValue()

        } else if (value instanceof OtpErlangList) {
            final OtpErlangList l = (OtpErlangList) value;
            return l.elementAt(index);
        } else if (value instanceof OtpErlangBinary) {
            final OtpErlangBinary bs = (OtpErlangBinary) value;
            int j = bs.binaryValue()[index];
            if (j < 0) {
                j += 256;
            }
            return new OtpErlangLong(j);
        } else if (list != null) {
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpErlangBinary.binaryValue()

      assertEquals(testArg[i], testResult[i]);
    }
    OtpErlangBinary received = (OtpErlangBinary) mboxListener.getMsg();
    assertEquals(testArg.length, received.size());
    for (int i = 0; i < testArg.length; i++) {
      assertEquals(testArg[i], received.binaryValue()[i]);
    }
  }

  /**
   * Tests passing lists
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpErlangBitstr.binaryValue()

    @Override
    public void dump(OtpErlangObject obj, StringBuffer resultHolder) {
      OtpErlangBitstr bitStr = (OtpErlangBitstr) obj;
      resultHolder.append("<< ");
      byte[] bitStringData = bitStr.binaryValue();
      if (bitStr.size() != bitStringData.length)
        throw new IllegalArgumentException(
            "the number of bits in the string is not divisible by 8, conversion cannot be accurately performed");
      boolean first = true;
      for (byte b : bitStringData) {
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpErlangBitstr.binaryValue()

    @Override
    public void dump(OtpErlangObject obj, StringBuffer resultHolder) {
      OtpErlangBitstr bitStr = (OtpErlangBitstr) obj;
      resultHolder.append("<< ");
      byte[] bitStringData = bitStr.binaryValue();
      if (bitStr.size() != bitStringData.length)
        throw new IllegalArgumentException(
            "the number of bits in the string is not divisible by 8, conversion cannot be accurately performed");
      boolean first = true;
      for (byte b : bitStringData) {
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpErlangBitstr.binaryValue()

    @Override
    public void dump(OtpErlangObject obj, StringBuffer resultHolder) {
      OtpErlangBitstr bitStr = (OtpErlangBitstr) obj;
      resultHolder.append("<< ");
      byte[] bitStringData = bitStr.binaryValue();
      if (bitStr.size() != bitStringData.length)
        throw new IllegalArgumentException(
            "the number of bits in the string is not divisible by 8, conversion cannot be accurately performed");
      boolean first = true;
      for (byte b : bitStringData) {
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpErlangBitstr.binaryValue()

    @Override
    public void dump(OtpErlangObject obj, StringBuffer resultHolder) {
      OtpErlangBitstr bitStr = (OtpErlangBitstr) obj;
      resultHolder.append("<< ");
      byte[] bitStringData = bitStr.binaryValue();
      if (bitStr.size() != bitStringData.length)
        throw new IllegalArgumentException(
            "the number of bits in the string is not divisible by 8, conversion cannot be accurately performed");
      boolean first = true;
      for (byte b : bitStringData) {
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpErlangBitstr.binaryValue()

    @Override
    public void dump(OtpErlangObject obj, StringBuffer resultHolder) {
      OtpErlangBitstr bitStr = (OtpErlangBitstr) obj;
      resultHolder.append("<< ");
      byte[] bitStringData = bitStr.binaryValue();
      if (bitStr.size() != bitStringData.length)
        throw new IllegalArgumentException(
            "the number of bits in the string is not divisible by 8, conversion cannot be accurately performed");
      boolean first = true;
      for (byte b : bitStringData) {
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jackson.databind.JsonNode.binaryValue()

        throws IOException, JsonParseException
    {
        // Multiple possibilities...
        JsonNode n = currentNode();
        if (n != null) { // binary node?
            byte[] data = n.binaryValue();
            // (or TextNode, which can also convert automatically!)
            if (data != null) {
                return data;
            }
            // Or maybe byte[] as POJO?
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.