无码av一区二区三区无码,在线观看老湿视频福利,日韩经典三级片,成 人色 网 站 欧美大片在线观看

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

TCPFileUploadClient

2023-06-07 10:10 作者:丶摩羯丶  | 我要投稿

public class TCPFileUploadClient{

? ? public static void main(String[] args) throws IOException {

? ? Socket socket = new Socket(InetAddress.getLocalHost(), 8888);

? ? String filePath = "e:\\qie.png";

? ? BufferedInputStream bis = new BufferedInputStream(new FileInputStream(filePath));

? ? byte[] bytes = StreamUtils.streamToByteArray(bis);

? ? BufferedOutputStream bos = new BufferedOutputStream(socket.getOutputStream());

? ? bos.write(bytes);

? ? bis.close();

? ? socket.shutdownoutput();

? ? InputStream inputStream = socket.getInputStream();

? ? String s = StreamUtils.streamToString(inputStream);

? ? System.out.println(s);

? ? inputStream.close();

? ? bos.close();

? ? socket.close


TCPFileUploadClient的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國家法律
东海县| 布尔津县| 敖汉旗| 桐乡市| 庆阳市| 西宁市| 图片| 扎赉特旗| 无棣县| 逊克县| 南开区| 富锦市| 城步| 西畴县| 永仁县| 黄大仙区| 昌黎县| 谢通门县| 乃东县| 陆河县| 潜山县| 屏南县| 屯留县| 云南省| 沂源县| 邮箱| 新邵县| 阿图什市| 从化市| 曲周县| 珠海市| 都江堰市| 洞头县| 呈贡县| 肇源县| 清原| 东明县| 聂拉木县| 隆子县| 讷河市| 拉孜县|