Timeout support for RXTX OutputStream.write()

Discussion in 'Java' started by Ralph Lecher, Nov 30, 2009.

  1. Ralph Lecher

    Ralph Lecher Guest

    Hi!

    With the RXTX Comm API is there a way to avoid OutputStream.write()
    blocking the application if the targeted serial device doesn't take
    over the offered data. I only found SerialPort.enableReceiveTimeout(),
    which I hope prevents at least InputStream.read() from heading towards
    Nirvana.

    TIA

    Ralph
     
    Ralph Lecher, Nov 30, 2009
    #1
    1. Advertisements

  2. Ralph Lecher wrote:
    > Hi!
    >
    > With the RXTX Comm API is there a way to avoid OutputStream.write()
    > blocking the application if the targeted serial device doesn't take
    > over the offered data. I only found SerialPort.enableReceiveTimeout(),
    > which I hope prevents at least InputStream.read() from heading towards
    > Nirvana.
    >
    > TIA
    >
    > Ralph


    It shouldn't block which just shows that RXTX has numerous bugs. Use
    Sun's JavaComm API. They support the Linux version and the Windows
    version still works fine (at least on XP). Your only other option is to
    buffer it.

    --

    Knute Johnson
    email s/nospam/knute2009/

    --
    Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
    ------->>>>>>http://www.NewsDemon.com<<<<<<------
    Unlimited Access, Anonymous Accounts, Uncensored Broadband Access
     
    Knute Johnson, Nov 30, 2009
    #2
    1. Advertisements

  3. In article <4b1405d5$0$3022$>,
    Knute Johnson <> wrote:

    > Ralph Lecher wrote:


    > > With the RXTX Comm API is there a way to avoid OutputStream.write()
    > > blocking the application if the targeted serial device doesn't take
    > > over the offered data. I only found SerialPort.
    > > enableReceiveTimeout(), which I hope prevents at least
    > > InputStream.read() from heading towards Nirvana.


    The ADTPro project does exactly that:

    <https://sourceforge.net/projects/adtpro/>

    If you're stuck with RXTX, you might like to look at the project's
    transport layer, which uses RXTX for serial I/O:

    <http://adtpro.cvs.sourceforge.net/viewvc/adtpro/adtpro/org/adtpro/transport/>

    > It shouldn't block which just shows that RXTX has numerous bugs. Use
    > Sun's JavaComm API. They support the Linux version and the Windows
    > version still works fine (at least on XP). Your only other option is
    > to buffer it.


    --
    John B. Matthews
    trashgod at gmail dot com
    <http://sites.google.com/site/drjohnbmatthews>
     
    John B. Matthews, Nov 30, 2009
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ryan Hartman

    large files via Response.OutputStream.Write

    Ryan Hartman, Nov 4, 2003, in forum: ASP .Net
    Replies:
    6
    Views:
    7,631
    Ryan Hartman
    Nov 11, 2003
  2. Richard
    Replies:
    3
    Views:
    3,779
    Craig Deelsnyder
    Jan 2, 2004
  3. =?Utf-8?B?Um9iIE5lbGRlcg==?=

    OutputStream.Write with PDF resulting in blank page in IE

    =?Utf-8?B?Um9iIE5lbGRlcg==?=, Jun 29, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    6,012
  4. PrePort

    BinaryWrite or OutputStream.Write

    PrePort, Feb 10, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    7,024
    preport
    Feb 12, 2006
  5. Daniel
    Replies:
    1
    Views:
    590
    Illya Kysil
    Nov 26, 2003
  6. Endi
    Replies:
    5
    Views:
    14,491
    Darryl Pierce
    Jun 26, 2005
  7. Replies:
    2
    Views:
    4,183
  8. Mark Probert

    Timeout::timeout and Socket timeout

    Mark Probert, Oct 6, 2004, in forum: Ruby
    Replies:
    1
    Views:
    1,632
    Brian Candler
    Oct 6, 2004
Loading...