Examples of IOHandleInstance


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

        return obj;
    }

    public static String readlinefh(SixModelObject obj, ThreadContext tc) {
        if (obj instanceof IOHandleInstance) {
            IOHandleInstance h = (IOHandleInstance)obj;
            if (h.handle instanceof IIOSyncReadable)
                return ((IIOSyncReadable)h.handle).readline(tc);
            else
                throw ExceptionHandling.dieInternal(tc,
                    "This handle does not support readline");
View Full Code Here

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

        }
    }

    public static String readlineintfh(SixModelObject obj, String prompt, ThreadContext tc) {
        if (obj instanceof IOHandleInstance) {
            IOHandleInstance h = (IOHandleInstance)obj;
            if (h.handle instanceof IIOInteractive)
                return ((IIOInteractive)h.handle).readlineInteractive(tc, prompt);
            else
                throw ExceptionHandling.dieInternal(tc,
                    "This handle does not support readline interactive");
View Full Code Here

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

        }
    }

    public static String readallfh(SixModelObject obj, ThreadContext tc) {
        if (obj instanceof IOHandleInstance) {
            IOHandleInstance h = (IOHandleInstance)obj;
            if (h.handle instanceof IIOSyncReadable)
                return ((IIOSyncReadable)h.handle).slurp(tc);
            else
                throw ExceptionHandling.dieInternal(tc,
                    "This handle does not support slurp");
View Full Code Here

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

        }
    }

    public static String getcfh(SixModelObject obj, ThreadContext tc) {
        if (obj instanceof IOHandleInstance) {
            IOHandleInstance h = (IOHandleInstance)obj;
            if (h.handle instanceof IIOSyncReadable)
                return ((IIOSyncReadable)h.handle).getc(tc);
            else
                throw ExceptionHandling.dieInternal(tc,
                    "This handle does not support getc");
View Full Code Here

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

        }
    }

    public static long eoffh(SixModelObject obj, ThreadContext tc) {
        if (obj instanceof IOHandleInstance) {
            IOHandleInstance h = (IOHandleInstance)obj;
            if (h.handle instanceof IIOSyncReadable)
                return ((IIOSyncReadable)h.handle).eof(tc) ? 1 : 0;
            else
                throw ExceptionHandling.dieInternal(tc,
                    "This handle does not support eof");
View Full Code Here

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

    }

    public static SixModelObject slurpasync(SixModelObject obj, SixModelObject resultType,
            SixModelObject done, SixModelObject error, ThreadContext tc) {
        if (obj instanceof IOHandleInstance) {
            IOHandleInstance h = (IOHandleInstance)obj;
            if (h.handle instanceof IIOAsyncReadable)
                ((IIOAsyncReadable)h.handle).slurp(tc, resultType, done, error);
            else
                throw ExceptionHandling.dieInternal(tc,
                    "This handle does not support async slurp");
View Full Code Here

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

    }

    public static SixModelObject spurtasync(SixModelObject obj, SixModelObject resultType, SixModelObject data,
            SixModelObject done, SixModelObject error, ThreadContext tc) {
        if (obj instanceof IOHandleInstance) {
            IOHandleInstance h = (IOHandleInstance)obj;
            if (h.handle instanceof IIOAsyncWritable)
                ((IIOAsyncWritable)h.handle).spurt(tc, resultType, data, done, error);
            else
                throw ExceptionHandling.dieInternal(tc,
                    "This handle does not support async spurt");
View Full Code Here

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

    @SuppressWarnings({ "unchecked", "rawtypes" })
    public static SixModelObject linesasync(SixModelObject obj, SixModelObject resultType,
            long chomp, SixModelObject queue, SixModelObject done, SixModelObject error,
            ThreadContext tc) {
        if (obj instanceof IOHandleInstance) {
            IOHandleInstance h = (IOHandleInstance)obj;
            if (h.handle instanceof IIOAsyncReadable)
                ((IIOAsyncReadable)h.handle).lines(tc, resultType, chomp != 0,
                    (LinkedBlockingQueue)((JavaObjectWrapper)queue).theObject,
                    done, error);
            else
View Full Code Here

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

        return obj;
    }

    public static SixModelObject closefh(SixModelObject obj, ThreadContext tc) {
        if (obj instanceof IOHandleInstance) {
            IOHandleInstance h = (IOHandleInstance)obj;
            if (h.handle instanceof IIOClosable)
                ((IIOClosable)h.handle).close(tc);
            else
                throw ExceptionHandling.dieInternal(tc,
                    "This handle does not support close");
View Full Code Here

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

        return obj;
    }

    public static long closefhi(SixModelObject obj, ThreadContext tc) {
        if (obj instanceof IOHandleInstance) {
            IOHandleInstance h = (IOHandleInstance)obj;
            if (h.handle instanceof IIOClosable
             && h.handle instanceof IIOExitable) {
                ((IIOClosable)h.handle).close(tc);
                return (long)((IIOExitable)h.handle).exitValue(tc);
            }
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.