Examples of VMArrayInstance_i8


Examples of org.perl6.nqp.sixmodel.reprs.VMArrayInstance_i8

public class Buffers {

    public static void stashBytes(ThreadContext tc, SixModelObject res, byte[] bytes) {
        if (res instanceof VMArrayInstance_i8) {
            VMArrayInstance_i8 arr = (VMArrayInstance_i8)res;
            arr.elems = bytes.length;
            arr.start = 0;
            arr.slots = bytes;
        }
        else {
View Full Code Here

Examples of org.perl6.nqp.sixmodel.reprs.VMArrayInstance_i8

    }

    public static ByteBuffer unstashBytes(SixModelObject buf, ThreadContext tc) {
        ByteBuffer bb;
        if (buf instanceof VMArrayInstance_i8) {
            VMArrayInstance_i8 bufi8 = (VMArrayInstance_i8)buf;
            bb = bufi8.slots != null
                ? ByteBuffer.wrap(bufi8.slots, bufi8.start, bufi8.elems)
                : ByteBuffer.allocate(0);
        }
        else if (buf instanceof VMArrayInstance_u8) {
View Full Code Here

Examples of org.perl6.nqp.sixmodel.reprs.VMArrayInstance_i8

    public static SixModelObject readfh(SixModelObject io, SixModelObject res, long bytes, ThreadContext tc) {
        if (io instanceof IOHandleInstance) {
            IOHandleInstance h = (IOHandleInstance)io;
            if (h.handle instanceof IIOSyncReadable) {
                if (res instanceof VMArrayInstance_i8) {
                    VMArrayInstance_i8 arr = (VMArrayInstance_i8)res;

                    byte[] array = ((IIOSyncReadable)h.handle).read(tc, (int)bytes);
                    arr.elems = array.length;
                    arr.start = 0;
                    arr.slots = array;
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.