Re: serial I/O throughput, javadoc errors
- Hi Paul,
The available method implemented by the abstract base class InputStream
does return zero. Subclasses will provide an implementation that
returns the number of characters in the buffer. Since InputStream is
abstract, any InputStream object instance will always be a subclass of
Thanks for pointing out the error in the Javadoc for getInputStream().
--- In email@example.com, "Paul King" <email@...> wrote:
> Thanks for the explanation. In this case, I'm wondering more about
serial bandwidth for frequent communication of sensor values to a host
system, e.g. pyrorobotics, and not for processing CMUCam data.
> By the way, testing reveals that InputStream.available() does, in
fact, return the number of characters in the input buffer. The Java Doc
page for this method says (erroneously?) that it always returns zero.
Maybe there is a hidden subclass that is actually instantiated, but this
is not obvious from the documentation. Might be better to remove the
comment about always returning 0.
> Also, there is a minor Java Doc error on the CommPort page. For
CommPort.getInputStream(), the java doc says it returns the "Output
Stream" when it should say "InputStream". Looks like a cut/paste error.