Popular Posts
Export list schema from sharepoint http:// YOUR_SERVER_URL / PATH_TO_SITE_CONTAINING_LIST /_vti_bin/owssvr.dll?Cmd=ExportList&List= {YOUR_LIST_GUID} JSRequest, Get parameters from querystring with javascript in SharePoint Provides method to parse query string, filename, and pathname from URL // Initialize first JSRequest.EnsureSetup(); // Get the current fil... ROBOCOPY: Robust File Copy for Windows -------------------------------------------------------------------------------    ROBOCOPY     ::     Robust File Copy for Windows --------...
Blog Archive
Stats
In applet, get resources in class directory
import java.applet.Applet;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

public class WebApplet extends Applet {

    public String getResource() throws IOException {
        URL url = getClass().getClassLoader().getResource("sgb/html/" + file);
        InputStream input = url.openStream();
        InputStreamReader reader = new InputStreamReader(input);
        BufferedReader buffer = new BufferedReader(reader);
        String line = null;
        StringBuilder sb = new StringBuilder();
        while ((line = buffer.readLine()) != null) {
            sb.append(line);
        }
        buffer.close();
        reader.close();
        input.close();
        return sb.toString();
    }
}
View mobile version