diff --git a/binaries/jSerialComm-2.0.3-test.jar b/binaries/jSerialComm-2.0.3-test.jar
deleted file mode 100644
index 157ee40..0000000
Binary files a/binaries/jSerialComm-2.0.3-test.jar and /dev/null differ
diff --git a/binaries/jSerialComm-2.0.3.jar b/binaries/jSerialComm-2.0.3.jar
deleted file mode 100644
index e22b67d..0000000
Binary files a/binaries/jSerialComm-2.0.3.jar and /dev/null differ
diff --git a/binaries/jSerialComm-2.1.0-test.jar b/binaries/jSerialComm-2.1.0-test.jar
new file mode 100644
index 0000000..e2c2167
Binary files /dev/null and b/binaries/jSerialComm-2.1.0-test.jar differ
diff --git a/binaries/jSerialComm-2.1.0.jar b/binaries/jSerialComm-2.1.0.jar
new file mode 100644
index 0000000..e9c9640
Binary files /dev/null and b/binaries/jSerialComm-2.1.0.jar differ
diff --git a/index.html b/index.html
index 173d6ab..9fd5c84 100644
--- a/index.html
+++ b/index.html
@@ -29,7 +29,7 @@
One of the most convenient features of this library is that it allows you to simply include the JAR file in your custom project, and it will automatically select and load the correct native library for your platform and architecture. As such, you can make use of this library by simply copying the jSerialComm.jar file into your project directory and linking to it as you would any other JAR file.
+One of the most convenient features of this library is that it allows you to simply include the JAR file in your custom project, and it will automatically select and load the correct native library for your platform and architecture. As such, you can make use of this library by simply copying the jSerialComm.jar file into your project directory and linking to it as you would any other JAR file.
To access the contents of the library in your project, make sure to import com.fazecast.jSerialComm.*
into your java files. You can then generate a list of all available serial ports on your system (real or virtual), by calling the following static method:
public final class SerialPort
extends java.lang.Object
int
bytesAvailable()
bytesAvailable()
readBytes(long, byte[], long)
were to be called immediately
+readBytes(long, byte[], long, long)
were to be called immediately
after this method returns.int
bytesAwaitingWrite()
bytesAwaitingWrite()
boolean
clearBreak()
clearBreak()
boolean
clearDTR()
clearDTR()
boolean
clearRTS()
clearRTS()
boolean
closePort()
closePort()
int
getBaudRate()
getBaudRate()
static SerialPort[]
getCommPorts()
getCommPorts()
boolean
getCTS()
getCTS()
java.lang.String
getDescriptivePortName()
getDescriptivePortName()
boolean
getDSR()
getDSR()
int
getFlowControlSettings()
getFlowControlSettings()
java.io.InputStream
getInputStream()
getInputStream()
InputStream
object associated with this serial port.int
getNumDataBits()
getNumDataBits()
int
getNumStopBits()
getNumStopBits()
java.io.OutputStream
getOutputStream()
getOutputStream()
OutputStream
object associated with this serial port.int
getParity()
getParity()
java.lang.String
getPortDescription()
getPortDescription()
int
getReadTimeout()
getReadTimeout()
readBytes(byte[],long)
call.java.lang.String
getSystemPortName()
getSystemPortName()
int
getWriteTimeout()
getWriteTimeout()
writeBytes(byte[],long)
call.boolean
isOpen()
isOpen()
boolean
openPort()
openPort()
int
readBytes(byte[] buffer,
+ long bytesToRead,
+ long offset)
void
removeDataListener()
removeDataListener()
SerialPortDataListener
from the serial port interface.void
setBaudRate(int newBaudRate)
boolean
setBreak()
setBreak()
void
setComPortParameters(int newBaudRate,
int newDataBits,
@@ -516,7 +526,7 @@ extends java.lang.Object
Sets all serial port parameters at one time.
void
setComPortTimeouts(int newTimeoutMode,
int newReadTimeout,
@@ -525,56 +535,56 @@ extends java.lang.Object
Sets the serial port read and write timeout parameters.
boolean
setDTR()
setDTR()
void
setFlowControl(int newFlowControlSettings)
void
setNumDataBits(int newDataBits)
void
setNumStopBits(int newStopBits)
void
setParity(int newParity)
boolean
setRTS()
setRTS()
java.lang.String
toString()
toString()
getPortDescription()
.int
writeBytes(byte[] buffer,
long bytesToWrite)
int
writeBytes(byte[] buffer,
+ long bytesToWrite,
+ long offset)
public java.lang.String toString()+
public java.lang.String toString()
getPortDescription()
. This may be useful for display containers which call a Java Object's default toString() method.public static SerialPort[] getCommPorts()+
public static SerialPort[] getCommPorts()
The serial ports can be accessed by iterating through each of the SerialPort objects in this array. @@ -1005,7 +1024,7 @@ extends java.lang.Object
public final boolean openPort()+
public final boolean openPort()
This method is equivalent to calling openPort(int)
with a value of 1000.
@@ -1025,7 +1044,7 @@ extends java.lang.Object
public final boolean closePort()+
public final boolean closePort()
Note that calling this method on an already closed port will simply return a value of true.
public final boolean isOpen()+
public final boolean isOpen()
public final int bytesAvailable()-
readBytes(long, byte[], long)
were to be called immediately
+public final int bytesAvailable()+
readBytes(long, byte[], long, long)
were to be called immediately
after this method returns.public final int bytesAwaitingWrite()+
public final int bytesAwaitingWrite()
Note that this method is not required or guaranteed to be implemented by the underlying device driver. Use it carefully and test your application to ensure it is working as you expect.
public final int readBytes(byte[] buffer, + long bytesToRead, + long offset)+
+ The length of the byte buffer minus the offset must be greater than or equal to the value passed in for bytesToRead +
+ If no timeouts were specified or the read timeout was set to 0, this call will block until bytesToRead bytes of data have been successfully read from the serial port. + Otherwise, this method will return after bytesToRead bytes of data have been read or the number of milliseconds specified by the read timeout have elapsed, + whichever comes first, regardless of the availability of more data.
buffer
- The buffer into which the raw data is read.bytesToRead
- The number of bytes to read from the serial port.offset
- The read buffer index into which to begin storing data.public final int writeBytes(byte[] buffer, + long bytesToWrite, + long offset)+
+ The length of the byte buffer minus the offset must be greater than or equal to the value passed in for bytesToWrite +
+ If no timeouts were specified or the write timeout was set to 0, this call will block until bytesToWrite bytes of data have been successfully written the serial port. + Otherwise, this method will return after bytesToWrite bytes of data have been written or the number of milliseconds specified by the write timeout have elapsed, + whichever comes first, regardless of the availability of more data.
buffer
- The buffer containing the raw data to write to the serial port.bytesToWrite
- The number of bytes to write to the serial port.offset
- The buffer index from which to begin writing to the serial port.public final boolean setBreak()+
public final boolean setBreak()
public final boolean clearBreak()+
public final boolean clearBreak()
public final boolean setRTS()+
public final boolean setRTS()
public final boolean clearRTS()+
public final boolean clearRTS()
public final boolean setDTR()+
public final boolean setDTR()
public final boolean clearDTR()+
public final boolean clearDTR()
public final boolean getCTS()+
public final boolean getCTS()
public final boolean getDSR()+
public final boolean getDSR()
public final void removeDataListener()+
public final void removeDataListener()
SerialPortDataListener
from the serial port interface.public final java.io.InputStream getInputStream()+
public final java.io.InputStream getInputStream()
InputStream
object associated with this serial port.
Allows for easier read access of the underlying data stream and abstracts away many low-level read details. @@ -1304,7 +1375,7 @@ extends java.lang.Object
public final java.io.OutputStream getOutputStream()+
public final java.io.OutputStream getOutputStream()
OutputStream
object associated with this serial port.
Allows for easier write access to the underlying data stream and abstracts away many low-level writing details. @@ -1534,7 +1605,7 @@ extends java.lang.Object
public final java.lang.String getDescriptivePortName()+
public final java.lang.String getDescriptivePortName()
This description is generated by the operating system and may or may not be a good representation of the actual port or @@ -1551,7 +1622,7 @@ extends java.lang.Object
public final java.lang.String getSystemPortName()+
public final java.lang.String getSystemPortName()
public final java.lang.String getPortDescription()+
public final java.lang.String getPortDescription()
This will only be available for USB-connected devices that report a product description. @@ -1582,7 +1653,7 @@ extends java.lang.Object
public final int getBaudRate()+
public final int getBaudRate()
public final int getNumDataBits()+
public final int getNumDataBits()
public final int getNumStopBits()+
public final int getNumStopBits()
The return value should not be interpreted as an integer, but rather compared with the built-in stop bit constants @@ -1631,7 +1702,7 @@ extends java.lang.Object
public final int getParity()+
public final int getParity()
The return value should not be interpreted as an integer, but rather compared with the built-in parity constants @@ -1654,7 +1725,7 @@ extends java.lang.Object
public final int getReadTimeout()+
public final int getReadTimeout()
readBytes(byte[],long)
call.
A value of 0 indicates that a readBytes(byte[],long)
call will block forever until it has successfully read
@@ -1674,7 +1745,7 @@ extends java.lang.Object
public final int getWriteTimeout()+
public final int getWriteTimeout()
writeBytes(byte[],long)
call.
A value of 0 indicates that a writeBytes(byte[],long)
call will block forever until it has successfully written
@@ -1696,7 +1767,7 @@ extends java.lang.Object
public final int getFlowControlSettings()+
public final int getFlowControlSettings()
The integer result should be masked with the built-in flow control constants to test if the desired setting is enabled. diff --git a/javadoc/com/fazecast/jSerialComm/SerialPortDataListener.html b/javadoc/com/fazecast/jSerialComm/SerialPortDataListener.html index 79a5ba1..e07f323 100644 --- a/javadoc/com/fazecast/jSerialComm/SerialPortDataListener.html +++ b/javadoc/com/fazecast/jSerialComm/SerialPortDataListener.html @@ -2,10 +2,10 @@
- -SerialPortPacketListener
public interface SerialPortDataListener
extends java.util.EventListener
int
getListeningEvents()
getListeningEvents()
serialEvent(SerialPortEvent)
callback should be triggered.int getListeningEvents()+
int getListeningEvents()
serialEvent(SerialPortEvent)
callback should be triggered.
Valid event constants are: diff --git a/javadoc/com/fazecast/jSerialComm/SerialPortEvent.html b/javadoc/com/fazecast/jSerialComm/SerialPortEvent.html index cc93d7c..eefa732 100644 --- a/javadoc/com/fazecast/jSerialComm/SerialPortEvent.html +++ b/javadoc/com/fazecast/jSerialComm/SerialPortEvent.html @@ -2,10 +2,10 @@
- -java.io.Serializable
public final class SerialPortEvent
extends java.util.EventObject
int
getEventType()
getEventType()
byte[]
getReceivedData()
getReceivedData()
SerialPort
getSerialPort()
getSerialPort()
SerialPort
that triggered this event.public final SerialPort getSerialPort()+
public final SerialPort getSerialPort()
SerialPort
that triggered this event.public final int getEventType()+
public final int getEventType()
Return values will be one and only one of the following: @@ -379,7 +376,7 @@ extends java.util.EventObject
public final byte[] getReceivedData()+
public final byte[] getReceivedData()
java.util.EventListener
, SerialPortDataListener
public interface SerialPortPacketListener extends SerialPortDataListener
int
getPacketSize()
getPacketSize()
SerialPortDataListener.serialEvent(SerialPortEvent)
callback is triggered.int getPacketSize()+
int getPacketSize()
SerialPortDataListener.serialEvent(SerialPortEvent)
callback is triggered.SerialPort.readBytes(long, byte[], long)
were to be called immediately
+SerialPort.readBytes(long, byte[], long, long)
were to be called immediately
after this method returns.SerialPortDataListener
from the serial port interface.