Package com.ajjpj.asysmon.util.io

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

Related Classes of com.ajjpj.asysmon.util.io.AFile

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.