Package org.jnode.driver

Examples of org.jnode.driver.RemovableDeviceAPI


        if (dev == null) {
            getError().getPrintWriter().println("No removable device found.");
            return;
        }

        final RemovableDeviceAPI api = dev.getAPI(RemovableDeviceAPI.class);
        try {
            if (!api.canEject()) {
                getError().getPrintWriter().format("No device found to %s.",
                    argLoad.isSet() ? "load" : "eject");
                return;
            }

            if (argLoad.isSet()) {
                api.load();
            } else {
                api.eject();
            }
        } catch (IOException ex) {
            getError().getPrintWriter().format(fmt_failed, dev.getId(), ex.getLocalizedMessage());
            exit(1);
        }
View Full Code Here

TOP

Related Classes of org.jnode.driver.RemovableDeviceAPI

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.