Results 1 to 2 of 2

Thread: output streams

  1. #1
    andre1011 is offline Member
    Join Date
    Feb 2009
    Sacramento CA
    Rep Power

    Default output streams

    I can tell if an input stream for a socket has received data with input.hasNextLine()

    How can you test if an output stream for a socket has sent data?

  2. #2
    MasterD is offline Member
    Join Date
    Mar 2009
    Rep Power


    You can call output.flush() which forces any buffered data to be sent to the underlying stream. If you don't get an IOException, I think you can tell, that the data has been sent (not received, though!).

Similar Threads

  1. Java, output string, getting correct output? HELP!
    By computerboyo in forum New To Java
    Replies: 2
    Last Post: 02-26-2009, 12:44 AM
  2. ObjectInput/Output Streams
    By Rhesus21 in forum Networking
    Replies: 3
    Last Post: 07-30-2008, 02:26 AM
  3. Runtime.exec(), handling input and output streams
    By crookshank in forum New To Java
    Replies: 0
    Last Post: 06-05-2008, 03:41 PM
  4. Using Filtered Streams
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-12-2007, 11:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts