Examples of IOOutputStream


Examples of org.apache.tomcat.lite.io.IOOutputStream

    BBuffer clBuffer = BBuffer.allocate(64);

    public HttpMessage(HttpChannel httpCh) {
        this.httpCh = httpCh;

        out = new IOOutputStream(httpCh.getOut(), httpCh);
        conv = new IOWriter(httpCh);
        writer = new HttpWriter(this, out, conv);

        in = new IOInputStream(httpCh, httpCh.getIOTimeout());
View Full Code Here

Examples of org.jruby.util.IOOutputStream

    private static OutputStream outputStream(IRubyObject out) {
        setBinmodeIfPossible(out);
        if (out instanceof RubyIO) {
            return ((RubyIO) out).getOutStream();
        }
        return new IOOutputStream(out);
    }
View Full Code Here

Examples of org.jruby.util.IOOutputStream

        IRubyObject io2 = null;
        if(args.length == 2 && args[1] != null && !args[1].isNil()) {
            io = args[1];
        }
        YAMLConfig cfg = YAML.config().version("1.0");
        IOOutputStream iox = null;
        if(null == io) {
            io2 = self.getRuntime().fastGetClass("StringIO").callMethod(context, "new");
            iox = new IOOutputStream(io2);
        } else {
            iox = new IOOutputStream(io);
        }
        Serializer ser = new JRubySerializer(new EmitterImpl(iox,cfg),new ResolverImpl(),cfg);
        try {
            ser.open();
            Representer r = new JRubyRepresenter(ser, cfg);
View Full Code Here

Examples of org.jruby.util.IOOutputStream

        private GZIPOutputStream io;
       
        @JRubyMethod(name = "initialize", required = 1, rest = true, frame = true, visibility = Visibility.PRIVATE)
        public IRubyObject initialize2(IRubyObject[] args, Block unusedBlock) throws IOException {
            realIo = (RubyObject)args[0];
            this.io = new GZIPOutputStream(new IOOutputStream(args[0]));
           
            return this;
        }
View Full Code Here

Examples of org.jruby.util.IOOutputStream

        if(null != os) {
            return new PrintStream(os);
        } else {
            return new PrintStream(new org.jruby.util.SwallowingOutputStream());
        }*/
        return new PrintStream(new IOOutputStream(getGlobalVariables().get("$stderr")));
    }
View Full Code Here

Examples of org.jruby.util.IOOutputStream

    public InputStream getInputStream() {
        return new IOInputStream(getGlobalVariables().get("$stdin"));
    }

    public PrintStream getOutputStream() {
        return new PrintStream(new IOOutputStream(getGlobalVariables().get("$stdout")));
    }
View Full Code Here

Examples of org.jruby.util.IOOutputStream

            private boolean headerIsWritten = false;
            private long modifiedTime = System.currentTimeMillis();
            private final static int DEFAULT_BUFFER_SIZE = 512;

            public HeaderModifyableGZIPOutputStream(IRubyObject io) throws IOException {
                super(new IOOutputStream(io, false, false), new Deflater(Deflater.DEFAULT_COMPRESSION, true), DEFAULT_BUFFER_SIZE);
                this.io = io;
                position = 0;
            }
View Full Code Here

Examples of org.jruby.util.IOOutputStream

    }

    private static OutputStream outputStream(ThreadContext context, IRubyObject out) {
        setBinmodeIfPossible(context, out);
        return new IOOutputStream(out);
    }
View Full Code Here

Examples of org.jruby.util.IOOutputStream

        if(null != os) {
            return new PrintStream(os);
        } else {
            return new PrintStream(new org.jruby.util.SwallowingOutputStream());
        }*/
        return new PrintStream(new IOOutputStream(getGlobalVariables().get("$stderr")));
    }
View Full Code Here

Examples of org.jruby.util.IOOutputStream

    public InputStream getInputStream() {
        return new IOInputStream(getGlobalVariables().get("$stdin"));
    }

    public PrintStream getOutputStream() {
        return new PrintStream(new IOOutputStream(getGlobalVariables().get("$stdout")));
    }
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.