Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / September 2007

Tip: Looking for answers? Try searching our database.

buffer size of serial port

Thread view: 
Wills - 20 Sep 2007 11:20 GMT
Hi all,
          When using javax.comm for serial communications what is the
buffer size where the data read from the UART is stored .The Serial
Communication APIs tell that we can use an InputStream object over the
Serial port to read data from it.The buffer size of the UART itself is
two, but how to find the size of the Java Buffer where data from UART
is kept before reading using read().

Thanks in advance.
Knute Johnson - 20 Sep 2007 17:49 GMT
> Hi all,
>            When using javax.comm for serial communications what is the
[quoted text clipped - 5 lines]
>
> Thanks in advance.

Why do you care.  Just read the data.  If you need to buffer it some
more, use a BufferedInputStream.  If you really have to know you can
call CommPort.getInputBufferSize().  Don't you have the docs?

Signature

Knute Johnson
email s/nospam/knute/

Wills - 26 Sep 2007 07:21 GMT
> Why do you care.  Just read the data.  If you need to buffer it some
> more, use a BufferedInputStream.  If you really have to know you can
[quoted text clipped - 4 lines]
> Knute Johnson
> email s/nospam/knute/

Thanks.
    The documentation says that the ".available()" method does not
guarantee exact number of data(bytes) available in the Buffered output
stream.
Knute Johnson - 26 Sep 2007 17:23 GMT
>> Why do you care.  Just read the data.  If you need to buffer it some
>> more, use a BufferedInputStream.  If you really have to know you can
[quoted text clipped - 9 lines]
> guarantee exact number of data(bytes) available in the Buffered output
> stream.

It should come with a big warning not to use it too!  You might want to
post some of your code here so we can see what you are up to.

Signature

Knute Johnson
email s/nospam/knute/



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.