Description: 首先创建FileInputStream的对象,
基于图片文件,创建一个输入流,通过FileInputStream获取图片文件,通过Scoket类创建实例对象获取上传的服务器Ip地址,然后通过Socket类的getOutputStream()方法上传图片,在通过while()循环进行判断,如果上传成功则输出客户端发送完成-First of all, create a FileInputStream object, based on the image file, create a input stream FileInputStream access through the picture files, by category Scoket access From the object to create instances of server Ip address, and then through the Socket class getOutputStream () method upload a picture, in the adoption of while () to determine the cycle, if the upload is successful the client to send the output to complete Platform: |
Size: 1024 |
Author:sport |
Hits:
Description: MyEclipse 下的java project 工程,功能是:使用FileInputStream 和FileOutputStream 进行文件的读取,保存操作。(用java代码实现文件的复制保存功能)本程序简单易懂,入门IO必看。-MyEclipse java project engineering functions: use FileInputStream and FileOutputStream file read and save operations. Copy of the file (using java code save function) The program is simple and easy to understand, and the entry-IO must see. Platform: |
Size: 3072 |
Author:Robin |
Hits:
Description: 用DataInputStream和FileInputStream流类,编制信用管理并显示顾客的账户信息,包括支出平衡、有盈余和有亏损。-Using DataInputStream and FileInputStream flow classes, preparation of credit management and customer account information, including balance of payments surplus and a loss. Platform: |
Size: 6144 |
Author:王月 |
Hits:
Description: 本程序是基于TCP/IP协议的网络通信程序,运用了Java的流、文件、多线程等编程技术。套接字对象在网络编程中扮演着重要的角色,该程序就是一个基于套接字技术编写的简单聊天工具。聊天功能所使用的输入输出流分别是BufferedReader和PrintWriter,服务器为客户端启动一个线程,在该线程中通过套接字和客户交流信息。当向服务器发送一条聊天信息:“Hello”时,服务器要向这个线程中的输出流写入信息:“Hello”,那么客户端套接字的输入流就读取到了这条消息。文件传输分为文件发送和文件接收两部分,当服务器端要向客户端发送文件时,先调用字节输入流FileInputStream从本机读取想要发送的文件,再将信息通过字节输出流BufferedOutputStream发送到客户端,这样客户端的字节输入流BufferedInputStream就读取到了相应信息,客户端再通过字节输出流FileOutputStream将信息以文件形式存入本机。-This program is based on network communication program TCP/IP protocol, the use of Java streams, files, and other multi-threaded programming techniques. Socket object plays an important role in network programming, the program is written in a simple socket-based chat tool technology. Input and output streams chat are used BufferedReader and PrintWriter, the server for the client to start a thread in the thread through the socket and customers to exchange information. When sending a chat message to the server: " Hello" , the server would like this thread output stream to write information: " Hello" , then the client socket input stream is read to this message. File transfer files sent and received document is divided into two parts, when the client would like the server to send the file, byte input stream FileInputStream first call to read the file you want to send from the machine, then the information output by the byte stream BufferedOutputStream sent to the client, s Platform: |
Size: 7168 |
Author:佟文浩 |
Hits: