Package pushy

Examples of pushy.Module


            catch (Throwable e)
            {
                e.printStackTrace();
            }
        }
        return new Module(client, name);
    }
View Full Code Here


    public FileReader(Client client, String path) {
        super(getInputStream(client, path), charset.newDecoder());
    }

    private static InputStream getInputStream(Client client, String path) {
        Module builtin = client.getModule("__builtin__");
        PushyObject open = (PushyObject)builtin.__getattr__("open");
        PushyObject file =
            (PushyObject)open.__call__(new String[]{path, "r"});
        return new FileInputStream(file);
    }
View Full Code Here

        write(new byte[]{(byte)b});
    }

    // Open a file in the remote interpreter.
    private static PushyObject open(Client client, String path, String mode) {
        Module builtin = client.getModule("__builtin__");
        PushyObject open = (PushyObject)builtin.__getattr__("open");
        return (PushyObject)open.__call__(new String[]{path, mode});
    }
View Full Code Here

        return (String)readMethod.__call__(new Object[]{new Integer(n)});
    }

    // Open a file in the remote interpreter.
    private static PushyObject open(Client client, String path, String mode) {
        Module builtin = client.getModule("__builtin__");
        PushyObject open = (PushyObject)builtin.__getattr__("open");
        return (PushyObject)open.__call__(new String[]{path, mode});
    }
View Full Code Here

TOP

Related Classes of pushy.Module

Copyright © 2018 www.massapicom. 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.