关于JavaIO流InputStream和OutputStream的获取方法

InputStream  inputStream = Socket.getInputStream();

InputStream  inputStream =  new FileInputStream(File file);

 

OutputStream  outputStream = Socket.getOutputStream();

OutputStream  OutputStream =  new FileOutputStream(File file);

 

在Android当中通过HttpURLConnection的getInputStream()方法也是可以获得

InputStream inputStream = urlConn.getInputStream();

 

 

你可能感兴趣的:(java)