Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-07-2008, 06:43 AM
Member
 
Join Date: Feb 2008
Posts: 1
Zucheto is on a distinguished road
Coding an FTP server in java
Hi, im new to Java and am in the beginning stages of socket programming. I am trying to build a simple file transfer protocol that can support the reliable transfer of files of at least 1 mb in size. I can set up a client and server connection to send strings back in forth but I'm not for sure how to code it to where I can actually pull files off my computer to send to the server. Is there anyone who could give me an example of how to actually send real files and not just strings? Would be greatly appreciated. THANKS
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-29-2008, 07:13 AM
Member
 
Join Date: Mar 2008
Posts: 3
redmoonzer01 is on a distinguished road
to send a file ...

server side=
create InputStream to the file to send
read in bytes to byte array
send byte array

client side=
create file
create outputstream to that file
write the bytes from byte array that you received to that file
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 05-31-2008, 12:39 AM
Member
 
Join Date: Jul 2007
Posts: 14
vglass is on a distinguished road
If you are going to write an FTP server I would recommend starting with reading the RFC 959 which describes the protocol itself.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 06-22-2008, 06:24 AM
fishtoprecords's Avatar
Senior Member
 
Join Date: Jun 2008
Posts: 475
fishtoprecords is on a distinguished road
Do you mean implement the FTP as specified in the RFCs? Or just a file protocol?

Do you need to handle big endian and little endian transfers? Machine that don't use 8 bit bytes?

To do it in general is fairly difficult, getting through firewalls, etc. But for an assignment, you can simplify the requirements.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help On Coding problem mandrake446 New To Java 3 12-08-2007 09:01 AM
Error in my coding one198 New To Java 2 10-13-2007 07:07 AM
Cannot solve the coding problem of my assignment elimmom New To Java 3 08-13-2007 01:33 PM
Problem in my coding one198 New To Java 9 08-09-2007 12:07 PM
Help with program coding cachi AWT / Swing 1 07-31-2007 09:16 AM


All times are GMT +3. The time now is 03:15 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org