public static String getPathToPackage(PackageDoc pd, String filename) {
        StringBuffer buf = new StringBuffer();
        String pathstr = createPathString(pd);
        if (pathstr.length() > 0) {
            buf.append(pathstr);
            buf.append(URL_FILE_SEPERATOR);
        }
        buf.append(filename);
        return buf.toString();
    }