Examples of AFile


Examples of com.ajjpj.abase.io.AFile

    static int physicalBlockSize(String dev) throws IOException {
        while (! dev.isEmpty()) {
            final File f = new File("/sys/block/" + dev + "/queue/physical_block_size");
            if(f.exists()) {
                return Integer.valueOf(new AFile(f, Charset.defaultCharset()).lines().get(0));
            }
            dev = dev.substring(0, dev.length()-1);
        }
        return 512;
    }
View Full Code Here

Examples of com.ajjpj.asysmon.util.io.AFile

    private int physicalBlockSize(String dev) throws IOException {
        while (! dev.isEmpty()) {
            final File f = new File("/sys/block/" + dev + "/queue/physical_block_size");
            if(f.exists()) {
                return Integer.valueOf(new AFile(f).lines(Charset.defaultCharset()).get(0));
            }
            dev = dev.substring(0, dev.length()-1);
        }
        return 512;
    }
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.