Package com.ajjpj.abase.io

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

TOP

Related Classes of com.ajjpj.abase.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.