Package abstrasy

Examples of abstrasy.Buffer.write_bytes()


        if (startAt.size() == 2) {
            int sz = (int) startAt.getSubNode(1, Node.TYPE_NUMBER).getNumber();
            byte[] buf = new byte[sz];
            int cread = input.read(buf);
            if (cread > 0) {
                buffer.write_bytes(buf, cread);
            }
            else {
                return Node.createNothing();
            }
        }
View Full Code Here


        else {
            byte[] buf = new byte[4096];
            int cread;
            while ((cread = input.read(buf)) != -1) {
                if (cread > 0) {
                    buffer.write_bytes(buf, cread);
                }
            }
            if (buffer.size() == 0 && cread == -1) {
                return Node.createNothing();
            }
View Full Code Here

        }
        if (sz > 0) {
            byte[] buf = new byte[sz];
            int cread = input.read(buf);
            if (cread > 0) {
                buffer.write_bytes(buf, cread);
            }
            if (buffer.size() == 0 && cread == -1) {
                return Node.createNothing();
            }
        }
View Full Code Here

   
    public Node external_to_buffer(Node startAt) throws Exception {
        startAt.isGoodArgsCnt(1);
        Buffer buffer = new Buffer();
        buffer.write_bytes(number.get().toByteArray());
        External_Buffer res = new External_Buffer();
        res.setBuffer(buffer);
        return Node.createExternal(res);
    }
View Full Code Here

        Buffer buffer=new Buffer();
        if(startAt.size()==2){
            int sz=(int)startAt.getSubNode(1, Node.TYPE_NUMBER).getNumber();
            byte[] buf = new byte[sz];
            int cread=raf.read(buf);
            if(cread>0){ buffer.write_bytes(buf, cread); }
        }
        else{
            byte[] buf = new byte[4096];
            int cread;
            while ((cread = raf.read(buf)) != -1) {
View Full Code Here

        }
        else{
            byte[] buf = new byte[4096];
            int cread;
            while ((cread = raf.read(buf)) != -1) {
                if(cread>0){ buffer.write_bytes(buf, cread); }
            }
        }
        External_Buffer res=new External_Buffer();
        res.setBuffer(buffer);
        return Node.createExternal(res);
View Full Code Here

        SELF.require_SELF_mutable();
        Buffer buffer=new Buffer();
        int sz = raf.readInt();
        byte[] buf = new byte[sz];
        int cread=raf.read(buf);
        if(cread>0){ buffer.write_bytes(buf, cread); }
        External_Buffer res=new External_Buffer();
        res.setBuffer(buffer);
        return Node.createExternal(res);
    }
   
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.