Java reads and writes a remote file and displays

xiaoxiao2021-03-06  78

Import java.net. *;

Import java.io. *;

Import java.util. *;

Public class readurlfile {

Public static void main (string [] args) throws exception {

URL URLFILE = New URL ("http://192.168.16.34/xuys/index_.html");

BufferedReader IN = New BufferedReader (NRLFile.OpenStream ()));

String content = "";

String infutline = in.readline ();

While (InputLine! = null) {

Content = INPUTLINE;

INPUTLINE = in.readline ();

}

System.out.println (Content);

In.Close ();

}

}

转载请注明原文地址:https://www.9cbs.com/read-108205.html

New Post(0)