Examples of InputStream


Examples of java.io.InputStream

                logPropertiesFile = new File(getTimefinderDirectory(), "log4j.properties");
                if (!logPropertiesFile.exists()) {
                    logPropertiesFile.createNewFile();

                    // copy from initial properties file from classpath
                    InputStream in = getClass().getResourceAsStream("/log4j.properties");
                    OutputStream out = new FileOutputStream(logPropertiesFile);
                    byte[] buf = new byte[1024];
                    int len;
                    while ((len = in.read(buf)) > 0) {
                        out.write(buf, 0, len);
                    }
                    in.close();
                    out.close();
                }
            } catch (IOException ex) {
                Logger.getLogger(ApplicationSettings.class.getName()).log(Level.SEVERE, null, ex);
            }
View Full Code Here

Examples of org.apache.lucene.store.InputStream

        byte[] buffer = new byte[1024];
        Directory dir = index.getDirectory();
        Directory dest = getDirectory();
        String[] files = dir.list();
        for (int i = 0; i < files.length; i++) {
            InputStream in = dir.openFile(files[i]);
            try {
                OutputStream out = dest.createFile(files[i]);
                try {
                    long remaining = in.length();
                    while (remaining > 0) {
                        int num = (int) Math.min(remaining, buffer.length);
                        in.readBytes(buffer, 0, num);
                        out.writeBytes(buffer, num);
                        remaining -= num;
                    }
                } finally {
                    out.close();
                }
            } finally {
                in.close();
            }
        }
    }
View Full Code Here

Examples of org.apache.yoko.orb.CORBA.InputStream

        if (dynValueWriter != null)
            _OB_marshal(out, dynValueWriter);
        else
            _OB_marshal(out);

        InputStream in = (InputStream) out.create_input_stream();
        Any result = new Any(orbInstance_, type_, in);
        return result;
    }
View Full Code Here

Examples of org.omg.CORBA.portable.InputStream

       
        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
        oStream.write_char('c');
       
        InputStream iStream = oStream.create_input_stream();
        streamable._read(iStream);
        CorbaPrimitiveHandler streamableObj = (CorbaPrimitiveHandler)streamable.getObject();
        Object o = streamableObj.getValue();
       
        assertTrue(o instanceof Character);
View Full Code Here

Examples of org.omg.CORBA_2_3.portable.InputStream

            // To check whether this is a local stub or not we must call
            // org.omg.CORBA.portable.ObjectImpl._is_local(), and _not_
            // javax.rmi.CORBA.Util.isLocal(Stub s), which in Sun's JDK
            // always return false.

            InputStream in = null;
            try {
                try {
                    OutputStream out =
                            (OutputStream) _request(operationName, true);
                    stubStrategy.writeParams(out, params);
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.