Receive Behavior in the Java(tm) Communications API

Receive Behavior in the Java(tm) Communications API

Version 2.0.3

License

Receive behavior in the Java(tm) Communications API is described below. Both the Solaris and the Windows reference implementations of the Java Communications API exhibit the following behavior.

If ReceiveFraming is enabled then read will return upon receiving the framing character. If any of the conditions below are set, read will return upon receiving the framing character or the condition becoming true, whichever happens first.

ReceiveThreshold ReceiveTimeout InputBuffer Behavior
Disabled Disabled n bytes Block until any data is available
Enabled, m bytes Disabled n bytes Block until min(m,n) bytes received
Disabled Enabled, x ms n bytes Block for x ms or until any data is available
Enabled, m bytes Enabled, x ms n bytes Block for x ms or until min(m,n) bytes received.
Note: This behavior is platform dependent.


Copyright © 2003 Sun Microsystems, Inc.
All Rights Reserved.