public OutputStream createClassFile(String name) throws IOException {
        String pathname = nameToPath(name, ".class");
        File file = new File(locations.get(CLASS_TREE),
                             pathname);
        OutputStream os = getOutputStream(file, name, FileKind.CLASS);
        return os;
    }