Examples of Bytes


Examples of abstrasy.Bytes

        return new Node(buffer.length() > 0 ? buffer.toString(): "");
    }

    public Node external_bytes(Node startAt) throws Exception {
        startAt.isGoodArgsCnt(1);
        return  Node.createBytes(new Bytes(buffer.getArray()));
    }
View Full Code Here

Examples of abstrasy.Bytes

        return Node.createExternal(res);
    }

    public Node external_bytes(Node startAt) throws Exception {
        startAt.isGoodArgsCnt(1);
        Bytes buffer = new Bytes(number.get().toByteArray());
        return Node.createBytes(buffer);
    }
View Full Code Here

Examples of abstrasy.Bytes

        /*
         * forme (peek-double bytes adr)
         *
         */
        startAt.isGoodArgsCnt(3);
        Bytes b = (Bytes)startAt.getSubNode(1, Node.TYPE_BYTES).getExternal();
        int adr = (int) startAt.getSubNode(2, Node.TYPE_NUMBER).getNumber();
        return new Node(b.peek_double(adr));
    }
View Full Code Here

Examples of abstrasy.Bytes

        /*
         * forme (peek-ushort bytes adr)
         *
         */
        startAt.isGoodArgsCnt(3);
        Bytes b = (Bytes)startAt.getSubNode(1, Node.TYPE_BYTES).getExternal();
        int adr = (int) startAt.getSubNode(2, Node.TYPE_NUMBER).getNumber();
        return new Node(b.peek_ushort(adr));
    }
View Full Code Here

Examples of abstrasy.Bytes

         * forme (poke-short! bytes adr v)
         *
         */
        startAt.isGoodArgsCnt(4);
        startAt.requireNodeType(1, Node.VTYPE_INDIRECTION);
        Bytes b = (Bytes)startAt.getSubNode(1, Node.TYPE_BYTES).getExternal();
        int adr = (int) startAt.getSubNode(2, Node.TYPE_NUMBER).getNumber();
        double v =startAt.getSubNode(3, Node.TYPE_NUMBER).getNumber();
        int vf=((int)v) 0xFFFF;
        if(vf!=v)
             throw new InterpreterException(StdErrors.extend(StdErrors.Invalid_parameter,""+v));
        b.poke_short(adr, (short)vf);
        return null;
    }
View Full Code Here

Examples of abstrasy.Bytes

            return new Node(acc);
        }
       
        if(qt==Node.TYPE_BYTES){
            // bytes
            Bytes turtle=arg0.getBytes();
            int total_s=turtle.length();
            for(int i=2;i<startAt.size();)
                total_s+=startAt.getSubNode(i++, qt).getBytes().length();
            Bytes acc=new Bytes(total_s);
            int pc=0;
            acc.poke_bytes(pc,turtle);
            for(int i=2;i<startAt.size();){
                pc+=turtle.length();
                turtle=startAt.getSubNode(i++, qt).getBytes();
                acc.poke_bytes(pc,turtle);
            }
            return Node.createBytes(acc);
        }
       
        else if(qt==Node.TYPE_CLIST){
            // liste
            Node acc=arg0.select(0, arg0.size());
            int i = 2;
            while (i < startAt.size()){
                Node ap=startAt.getSubNode(i++, qt);
                for(int j=0;j<ap.size();j++)
                    acc.addElement(ap.elementAt(j).secure());
            }
            return acc;
        }
        else {
            // hash
View Full Code Here

Examples of abstrasy.Bytes

        /*
         * forme (peek bytes adr)
         *
         */
        startAt.isGoodArgsCnt(3);
        Bytes b = (Bytes)startAt.getSubNode(1, Node.TYPE_BYTES).getExternal();
        int adr = (int) startAt.getSubNode(2, Node.TYPE_NUMBER).getNumber();
        return new Node(b.peek(adr));
    }
View Full Code Here

Examples of abstrasy.Bytes

         * forme (poke-float! bytes adr v)
         *
         */
        startAt.isGoodArgsCnt(4);
        startAt.requireNodeType(1, Node.VTYPE_INDIRECTION);
        Bytes b = (Bytes)startAt.getSubNode(1, Node.TYPE_BYTES).getExternal();
        int adr = (int) startAt.getSubNode(2, Node.TYPE_NUMBER).getNumber();
        double v =startAt.getSubNode(3, Node.TYPE_NUMBER).getNumber();
        float vf=(float)v;
        b.poke_float(adr, vf);
        return null;
    }
View Full Code Here

Examples of abstrasy.Bytes

        /*
         * forme (peek-float bytes adr)
         *
         */
        startAt.isGoodArgsCnt(3);
        Bytes b = (Bytes)startAt.getSubNode(1, Node.TYPE_BYTES).getExternal();
        int adr = (int) startAt.getSubNode(2, Node.TYPE_NUMBER).getNumber();
        return new Node(b.peek_float(adr));
    }
View Full Code Here

Examples of abstrasy.Bytes

        /*
         * forme (peek-int bytes adr)
         *
         */
        startAt.isGoodArgsCnt(3);
        Bytes b = (Bytes)startAt.getSubNode(1, Node.TYPE_BYTES).getExternal();
        int adr = (int) startAt.getSubNode(2, Node.TYPE_NUMBER).getNumber();
        return new Node(b.peek_int(adr));
    }
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.