Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unix: add SerialPort.read(byte[] buffer) #45

Open
wants to merge 1 commit into
base: 2.8.1-experimental
Choose a base branch
from
Open

Unix: add SerialPort.read(byte[] buffer) #45

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Jul 2, 2014

A function that receives a buffer and fill it can be very useful.

@MrDOS
Copy link

MrDOS commented Jul 23, 2014

Alternatively, the input stream interface (#17) would be able to do this.

@cmaglie
Copy link
Contributor

cmaglie commented Jan 6, 2015

IMHO, It would be much more useful to have the following method implemented natively:

public int read(byte buffer[], int offs, int len);

this will give two advantages:

  1. the read(byte buffer[]) can be simply implemented through java as:
public int read(byte buffer[]) {
  return read(buffer, 0, buffer.length);
}
  1. both methods can be used to implement the InputStream interface.

hiddenalpha pushed a commit to hiddenalpha/jssc that referenced this pull request May 18, 2021
Add Solaris 10,11 build support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants