Package erjang

Examples of erjang.EInputStream.read_any()


    if (log.isLoggable(Level.FINE)) log.fine("Number of literals: "+nLiterals);
    literals = new EObject[nLiterals];
    for (int i=0; i<nLiterals; i++) {
      int lit_length = is.read4BE();
      int pos_before_lit = is.getPos();
      literals[i] = is.read_any();
      if (log.isLoggable(Level.FINE)) log.fine("- #"+i+": "+literals[i]);
      int pos_after_lit = is.getPos();
      assert(pos_after_lit == pos_before_lit + lit_length);
    }
    }
View Full Code Here


  public static EObject binary_to_term(EObject arg) {
    EBinary bin;
    if ((bin=arg.testBinary()) == null) throw ERT.badarg(arg);
    EInputStream in = bin.getInputStream();
    try {
      EObject val = in.read_any();
      //System.out.println("DECODED:"+val);
      return val;
    } catch (IOException e) {
      throw new ErlangError(ERT.am_badarg, e, arg);
    }
View Full Code Here

      if (options.head() == am_safe) {
        in.setSafe(true);
      }
    }
    try {
      EObject val = in.read_any();
      return val;
    } catch (ErlangError e) {
      throw new ErlangError(ERT.am_badarg, e, arg);
    } catch (IOException e) {
      throw new ErlangError(ERT.am_badarg, e, arg);
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.