Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Socket photoSocket = new Socket(picServerIP, picServerPort);
- DataOutputStream dos = new DataOutputStream(photoSocket.getOutputStream());
- FileInputStream fis = new FileInputStream(fileEntry.getPath());
- int size = fis.available();
- byte[] data = new byte[size];
- fis.read(data);
- dos.writeInt(size);
- dos.write(data);
- sleep(500);
- dos.flush();
- dos.close();
- fis.close();
- photoSocket.close();
Advertisement
Add Comment
Please, Sign In to add comment