This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes File outputted has size zero Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "File outputted has size zero" Watch "File outputted has size zero" New topic

File outputted has size zero

Alan Brooks

Joined: Nov 30, 2008
Posts: 14
Hello what i am doing is sending a file from and android phone to a java server. The fact that there is an android phone is irrelevant. The problem is when the file is sent over sockets and is outputted the file is of size zero so i can not get the information out of it. The code is below any help would be much appreciated.


Server on pc

Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 30130

Can you reproduce the problem without the sockets? That will help narrow down the causes. It will also allow someone to run the example to see what is going on.

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Don't get me started about those stupid light bulbs.
subject: File outputted has size zero
Similar Threads
Sending a file over socket
Phone to phone/emulator comminication
copying files over a network
Socket connection program works for localhost but not for other ip
Transfer multiple files from Server to Client using Sockets