This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Text Or Binary  RSS feed

 
Richard West
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

I do not actually have web page i can test this with but would really appreciate anyone with experience on this topic.

You see i am trying to upload a html page called wt.html from my disk to a website called http://www.rt.com/rf/wt.html using the HttpUrlConnection by first authenticating myself into the server getting its outputstream and getting rady to transfer the data.

Here is where my program begins, when a html file is involved do i transfer the data in text form by reading the html tags one by one from the html file on my disk and transferring the html tags one by one using the PrintStream class

Or

can i just use the FileInputStream class to transfer the file from my disk to the server.

For zip files and other data format, i know that i can use the FileInputStream
and do this but for html i am not really that sure and hope that someone can shed some light on this topic for me or anyone that has experience in this arena as i do not actually have a webpage to test this problem with

Any help is greatly appreciated

Thank You

Yours Sincerely

Richard West
 
Richard West
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

Originally posted by Ben Souther:
Re-opened at the original poster's request.

[ August 01, 2006: Message edited by: Ben Souther ]


Thanks Ben

Richard West
 
Paul Clapham
Sheriff
Posts: 22374
42
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just use FileInputStream and transfer all files as binary.
 
Richard West
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

Originally posted by Paul Clapham:
Just use FileInputStream and transfer all files as binary.


You mean FileOutputStream right?
I am talking about uploading to a server.

Please correct me if i am wrong.

Hoping to hear from you

Yours Sincerely

Richard West
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you writing a custom client for uploading?
If so, the servlets forum (which deals with server side Java code) may not be the write place for this thread.

Let me know and I'll move it to a more appropriate forum.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!