|
A�
vai um Exemplo: import java.awt.*; import java.applet.*; import java.util.*; import java.io.*; import java.net.URL; import java.net.MalformedURLException; public class Teste extends Applet { String
fileName = "teste.txt"; //************************************************************************ // initialization time!
//************************************************************************ public void init() { this.leArquivo(); } synchronized void leArquivo() { InputStream
conn; DataInputStream dis = null; URL theURL = null; if (fileName==null)
return; try {
if (fileName.indexOf("http://") >= 0 ) {
theURL = new URL(fileName);
}
else {
theURL = new URL(this.getDocumentBase(),fileName); }
try {
String line;
conn = theURL.openStream();
dis = new DataInputStream(new BufferedInputStream(conn));
while( (line=dis.readLine())!=null) { this.add(new
Label(line));
}
}
catch (IOException e) {} } catch
(MalformedURLException e) {} } } []s, Sergio
Stateri Jr [EMAIL PROTECTED] -----Mensagem
original----- Pessoal estou
com um problema, [ ] ,s -- |
- [java-list] Applet obtendo arquivos do Servidor Fl�vio Fagundes
- Sergio Stateri Jr
