Package net.jcores.jre.cores

Examples of net.jcores.jre.cores.CoreFile


     * @see net.xeoh.plugins.diagnosisreader.converters.Converter#convert(java.io.File)
     */
    @Override
    public void convert(File file) {
       
        final CoreFile f = $(file.getAbsolutePath() + ".txt").file().delete();
       
        this.diagnosis.replay(file.getAbsolutePath(), new DiagnosisMonitor<Serializable>() {
            @Override
            public void onStatusChange(DiagnosisStatus<Serializable> status) {
                final StringBuilder sb = new StringBuilder();
                sb.append(status.getDate());
                sb.append(" ");
                sb.append($(status.getChannelAsString()).split("\\.").get(-1));
                sb.append(" ");
                sb.append(status.getValue());
                sb.append(" { ");
                sb.append($(status.getInfos()).map(new F1<OptionInfo, String>() {
                    @Override
                    public String f(OptionInfo arg0) {
                        return arg0.getKey() + ":" + $(arg0.getValue()).get("null");
                    }
                }).string().join(", "));
                sb.append(" }\n");
               
                // Write text to file
                f.append(sb.toString());
            }
        });
       
    }
View Full Code Here


     *
     * @param object The Files to wrap.
     * @return A CoreFile wrapping the given Files.
     */
    public static CoreFile $(File... object) {
        return new CoreFile($, object);
    }
View Full Code Here

    /** */
    @Test
    public void testZip() {
        final String path = $.sys.tempfile().getAbsolutePath();
       
        final CoreFile source = $("documentation").file();
        final int srcsize = source.dir().size();
       
        // Zip by path
        source.zip(path);
        Assert.assertEquals(srcsize, $(path).file().input().zipstream().dir().size());
        $(path).file().delete();
    }
View Full Code Here

TOP

Related Classes of net.jcores.jre.cores.CoreFile

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.