forked from scream3r/java-simple-serial-connector
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make 'write()' return number of bytes written
Some thoughts about java-native#129 What this commit does: - Make native impls return numberOfBytesWritten. - Throw SerialPortException in case write fails in some way. - Expose new 'write()' method to java which returns numberOfBytesWritten and uses exceptions for error handling. - Keep old 'writeBytes()' method and translate to the old behavior. What this commit does NOT: THIS CODE IS NOT TESTED! It even was not launched at all. Nevertheless it did compile fine for x86_64-linux-gnu (debian) and mingw (cross-compile). So we need to do: - Testing! - Review if the change in the API (adding a 'write()' method) is the thing we should do or if we should do it differently somehow. (wip @ 36ee5d8)
- Loading branch information
1 parent
6886b44
commit 7ed987d
Showing
4 changed files
with
37 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters