Hello people,
When we talk about "sign applets" this is mainly for reading a clients PC, but if I'm correct ... could we read with an application.
The main purpose is I have a class where I look up a url with a certain door and make a copy of it on my hard drive,
import java.net.*;
import java.io.*;
class ReadUrl
{
public static void main(
String[] args)
{
try
{
// Define a URL
URL sourceURL = new URL(
"http://mywebsite.qc.ca/door/2424");
// Get a character input stream for the URL
BufferedReader in = new BufferedReader(
new InputStreamReader(
sourceURL.openStream()));
// Create the stream for the output file
PrintWriter out = new PrintWriter(
new BufferedWriter(
new FileWriter(
new File("C:/mydir/test.java"))));
// Read the URL and write it to a file
String buffer; // Buffer to store lines
while(!(null==(buffer=in.readLine())))
out.println(buffer);
in.close(); // Close the input stream
out.close(); // Close the output file
}
catch(MalformedURLException e)
{
System.out.println("Failed to create URL:\n" + e);
}
catch(IOException e)
{
System.out.println("File error:\n" + e);
}
}
}
But now I need to look in a clients machine (laptop) because he is traveling and if a cretain file exist upload it to my server.
Can someone help me because I'm
Phil