Results 1 to 1 of 1
- 05-24-2012, 08:37 PM #1
Member
- Join Date
- May 2012
- Posts
- 1
- Rep Power
- 0
Extra Q needed between buffered socket read and buffered file write? (multithreaded)
I have some code that reads from a socket via an input stream created as:
and writes to a file via an output stream created as:Java Code:dataInStream = new BufferedInputStream(dataSocket.getInputStream());
Both operations are in the same while loop.Java Code:outputFile = new BufferedWriter(new FileWriter(filename));
At what point (data rate-wise) might I need to split out the file write operation into another thread
with something like a ConcurrentLinkedQueue between the reader and writer threads?
The expected message rates are low (i.e. 1400 byte msgs at ~10hz)
ANY insights would be very much appreciated! I'd like to hear some rationale one way or the other.
thanks,
-- Steve
Similar Threads
-
Double Buffered
By hqt in forum Java 2DReplies: 2Last Post: 02-02-2012, 04:14 AM -
Buffered Images
By sgthale in forum New To JavaReplies: 2Last Post: 08-01-2011, 07:15 AM -
Buffered Reader File Location
By sehudson in forum New To JavaReplies: 2Last Post: 03-02-2011, 01:40 AM -
Buffered Reader
By ilovepolluting in forum New To JavaReplies: 2Last Post: 02-04-2010, 09:16 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks