JAVA new File (網絡路徑)

import java.net.URL;    

public static void main(String[] args) {
        try {
            URL url = new URL("http://10.xxx/xxx/abc.xlsx");
            URLConnection connection = url.openConnection();
            InputStream is = connection.getInputStream();
            BufferedReader br = new BufferedReader(new InputStreamReader(is,"gb2312"));
        } catch (MalformedURLException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

原文地址:https://zhidao.baidu.com/question/1644613345804810220.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章