•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 392,001 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,177 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Java advertiser: Lunarpages Java Web Hosting
Views: 969 | Replies: 4
![]() |
•
•
Join Date: Jun 2004
Posts: 604
Reputation:
Rep Power: 6
Solved Threads: 6
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
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
Microsoft uses "One World, One Web, One Program" as a slogan.
Doesn’t that sound like "Ein Volk, Ein Reich, Ein Führer" to you, too?
— Eric S. Raymond
Tell me what type of software do you like and what would you pay for it
http://www.daniweb.com/techtalkforums/thread19660.html
Doesn’t that sound like "Ein Volk, Ein Reich, Ein Führer" to you, too?
— Eric S. Raymond
Tell me what type of software do you like and what would you pay for it
http://www.daniweb.com/techtalkforums/thread19660.html
•
•
Join Date: Nov 2004
Location: Netherlands
Posts: 5,646
Reputation:
Rep Power: 18
Solved Threads: 191
FileInputStream is readonly, FileOutputStream is writeonly...
And those won't cover a scenario where you don't have a drivemapping to the remote site, you'll need a network stream wrapped around it as well for the correct protocol.
And those won't cover a scenario where you don't have a drivemapping to the remote site, you'll need a network stream wrapped around it as well for the correct protocol.
42 Private messages asking for help will be ignored
In the frozen land of Nador they were forced to eat Steve's iMinstrels, and there was much rejoicing.
In the frozen land of Nador they were forced to eat Steve's iMinstrels, and there was much rejoicing.
•
•
Join Date: Jun 2004
Posts: 604
Reputation:
Rep Power: 6
Solved Threads: 6
Hi everyone,
Yes sorry i meant FileOutputStream, it was a typo
Assuming that i have already gotten what you mention above all covered, do i need to transfer tags by tags or is the FileoutputStream sufficient.
Hoping to hear from you
Yours Sincerely
Richard West
•
•
•
•
Originally Posted by jwenting
FileInputStream is readonly, FileOutputStream is writeonly
Yes sorry i meant FileOutputStream, it was a typo
•
•
•
•
Originally Posted by jwenting
And those won't cover a scenario where you don't have a drivemapping to the remote site, you'll need a network stream wrapped around it as well for the correct protocol.
Assuming that i have already gotten what you mention above all covered, do i need to transfer tags by tags or is the FileoutputStream sufficient.
Hoping to hear from you
Yours Sincerely
Richard West
Last edited by freesoft_2000 : Aug 1st, 2006 at 2:44 pm.
Microsoft uses "One World, One Web, One Program" as a slogan.
Doesn’t that sound like "Ein Volk, Ein Reich, Ein Führer" to you, too?
— Eric S. Raymond
Tell me what type of software do you like and what would you pay for it
http://www.daniweb.com/techtalkforums/thread19660.html
Doesn’t that sound like "Ein Volk, Ein Reich, Ein Führer" to you, too?
— Eric S. Raymond
Tell me what type of software do you like and what would you pay for it
http://www.daniweb.com/techtalkforums/thread19660.html
•
•
Join Date: Nov 2004
Location: Netherlands
Posts: 5,646
Reputation:
Rep Power: 18
Solved Threads: 191
You will need a ByteArrayOutputStream linked to your FileOutputStream.
That you can link to the network port and dump the content of the file as a stream, the content of the file is then completely irrelevant.
That you can link to the network port and dump the content of the file as a stream, the content of the file is then completely irrelevant.
42 Private messages asking for help will be ignored
In the frozen land of Nador they were forced to eat Steve's iMinstrels, and there was much rejoicing.
In the frozen land of Nador they were forced to eat Steve's iMinstrels, and there was much rejoicing.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Java Marketplace
- Convert binary into text/text into binary (Pascal and Delphi)
- file size (C++)
- Debugging in VC++ 2005? (C++)
- C fputc and fgetc vs C++ read and write (C++)
- reading a file into code (Java)
Other Threads in the Java Forum
- Previous Thread: separate mantissa and exponent of a double
- Next Thread: Help Needed Badly!!!!!!!!!!!!!!!!!!!!!!!!!!!



Linear Mode