Splitting an InputStream

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jun 2007
Posts: 59
Reputation: Chaster is an unknown quantity at this point 
Solved Threads: 3
Chaster Chaster is offline Offline
Junior Poster in Training

Splitting an InputStream

 
0
  #1
Feb 18th, 2009
Yellow,

From my application - for some reason - I am able to send messages up to only 64k. I've been wondering if it is possible to split an InputStream into partitions of 64k, and then, on client side to join them again. Is this possible? Have you ever done such thing before? Please, share your experience.

Thanks for answers in advance,
Chaster
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 1,637
Reputation: BestJewSinceJC is a splendid one to behold BestJewSinceJC is a splendid one to behold BestJewSinceJC is a splendid one to behold BestJewSinceJC is a splendid one to behold BestJewSinceJC is a splendid one to behold BestJewSinceJC is a splendid one to behold 
Solved Threads: 206
BestJewSinceJC BestJewSinceJC is offline Offline
Posting Virtuoso

Re: Splitting an InputStream

 
0
  #2
Feb 18th, 2009
Post your code (the part that is relevant to your question). http://java.sun.com/docs/books/tutor...ngWriting.html

Also, take a look at that example, particularly the part where the PrintWriter and BufferedReader objects are created.
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 59
Reputation: Chaster is an unknown quantity at this point 
Solved Threads: 3
Chaster Chaster is offline Offline
Junior Poster in Training

Re: Splitting an InputStream

 
0
  #3
Feb 18th, 2009
Thanks for the quick reply, however, I don't use sockets explicitly. I've been developing a P2P application using the JXTA platform. I didn't post code, since posting how I read a file's content into an InputStream would not make much sense...
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 1,637
Reputation: BestJewSinceJC is a splendid one to behold BestJewSinceJC is a splendid one to behold BestJewSinceJC is a splendid one to behold BestJewSinceJC is a splendid one to behold BestJewSinceJC is a splendid one to behold BestJewSinceJC is a splendid one to behold 
Solved Threads: 206
BestJewSinceJC BestJewSinceJC is offline Offline
Posting Virtuoso

Re: Splitting an InputStream

 
0
  #4
Feb 18th, 2009
well, somebody might know something I don't, but you're unlikely to get much help without posting code.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC