Package com.ericsson.otp.erlang

Examples of com.ericsson.otp.erlang.OtpErlangBitstr


      return singleton;
    }

    @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) {
        if (!first)
View Full Code Here


            "the length of bit string should be divisible by 8");
      byte[] bitData = new byte[data.size()];
      int i = 0;
      for (Byte b : data)
        bitData[i++] = b.byteValue();
      return new OtpErlangBitstr(bitData);
    }
View Full Code Here

     *
     * @param value
     *            the value to use
     */
    public ErlangValueBitString(final String value) {
        super(new OtpErlangBitstr(value.getBytes()));
    }
View Full Code Here

TOP

Related Classes of com.ericsson.otp.erlang.OtpErlangBitstr

Copyright © 2018 www.massapicom. 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.