From 399105718743937d69861122aec0bc9524e86c52 Mon Sep 17 00:00:00 2001 From: hedgecrw85 Date: Wed, 8 Aug 2018 12:44:01 -0500 Subject: [PATCH] Update javadoc link URL and version number --- build.gradle | 4 +- .../jSerialComm/SerialPortDataListener.java | 2 +- .../fazecast/jSerialComm/SerialPortEvent.java | 2 +- .../jSerialComm/SerialPortIOException.java | 83 +++++++++++++++++++ .../jSerialComm/SerialPortPacketListener.java | 2 +- .../SerialPortTimeoutException.java | 83 +++++++++++++++++++ 6 files changed, 171 insertions(+), 5 deletions(-) create mode 100644 src/main/java/com/fazecast/jSerialComm/SerialPortIOException.java create mode 100644 src/main/java/com/fazecast/jSerialComm/SerialPortTimeoutException.java diff --git a/build.gradle b/build.gradle index eaeb4e8..0d8149c 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ apply plugin: 'osgi' group = 'com.fazecast' archivesBaseName = 'jSerialComm' -version = '2.1.2' +version = '2.2.0' ext.moduleName = 'com.fazecast.jSerialComm' assert hasProperty('java6Home'): "Set the property 'java6Home' in your gradle.properties file pointing to a Java 6 JDK installation" @@ -13,7 +13,7 @@ assert hasProperty('java9Home'): "Set the property 'java9Home' in your gradle.pr sourceCompatibility = 1.6 targetCompatibility = 1.6 -javadoc.options.links("http://docs.oracle.com/javase/8/docs/api/") +javadoc.options.links("https://docs.oracle.com/javase/9/docs/api/") javadoc.options.addBooleanOption('html4', true) def java6ExecutablesPath = new File(java6Home, 'bin') diff --git a/src/main/java/com/fazecast/jSerialComm/SerialPortDataListener.java b/src/main/java/com/fazecast/jSerialComm/SerialPortDataListener.java index d130c03..bde9afe 100644 --- a/src/main/java/com/fazecast/jSerialComm/SerialPortDataListener.java +++ b/src/main/java/com/fazecast/jSerialComm/SerialPortDataListener.java @@ -31,7 +31,7 @@ import java.util.EventListener; * This interface must be implemented to enable simple event-based serial port I/O. * * @author Will Hedgecock <will.hedgecock@fazecast.com> - * @version 2.1.2 + * @version 2.2.0 * @see java.util.EventListener */ public interface SerialPortDataListener extends EventListener diff --git a/src/main/java/com/fazecast/jSerialComm/SerialPortEvent.java b/src/main/java/com/fazecast/jSerialComm/SerialPortEvent.java index 6f24e7e..5a4adef 100644 --- a/src/main/java/com/fazecast/jSerialComm/SerialPortEvent.java +++ b/src/main/java/com/fazecast/jSerialComm/SerialPortEvent.java @@ -31,7 +31,7 @@ import java.util.EventObject; * This class describes an asynchronous serial port event. * * @author Will Hedgecock <will.hedgecock@fazecast.com> - * @version 2.1.2 + * @version 2.2.0 * @see java.util.EventObject */ public final class SerialPortEvent extends EventObject diff --git a/src/main/java/com/fazecast/jSerialComm/SerialPortIOException.java b/src/main/java/com/fazecast/jSerialComm/SerialPortIOException.java new file mode 100644 index 0000000..c1d8714 --- /dev/null +++ b/src/main/java/com/fazecast/jSerialComm/SerialPortIOException.java @@ -0,0 +1,83 @@ +/* + * SerialPortIOException.java + * + * Created on: Aug 08, 2018 + * Last Updated on: Aug 08, 2018 + * Author: Will Hedgecock + * + * Copyright (C) 2018-2018 Fazecast, Inc. + * + * This file is part of jSerialComm. + * + * jSerialComm is free software: you can redistribute it and/or modify + * it under the terms of either the Apache Software License, version 2, or + * the GNU Lesser General Public License as published by the Free Software + * Foundation, version 3 or above. + * + * jSerialComm is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of both the GNU Lesser General Public + * License and the Apache Software License along with jSerialComm. If not, + * see and . + */ + +package com.fazecast.jSerialComm; + +import java.io.IOException; + +/** + * This class describes a serial port IO exception. + * + * @author Will Hedgecock <will.hedgecock@fazecast.com> + * @version 2.2.0 + * @see java.util.EventObject + */ +public final class SerialPortIOException extends IOException +{ + private static final long serialVersionUID = 3353684802475494674L; + + /** + * Constructs a {@link SerialPortIOException} with {@code null} as its error detail message. + */ + public SerialPortIOException() + { + super(); + } + + /** + * Constructs a {@link SerialPortIOException} with the specified detail message. + * + * @param message The detail message (which is saved for later retrieval by the {@link getMessage()} method). + */ + public SerialPortIOException(String message) + { + super(message); + } + + /** + * Constructs a {@link SerialPortIOException} with the specified detail message and cause. + *

+ * Note that the detail message associated with {@link cause} is not automatically incorporated into this exception's detail message. + * + * @param message message The detail message (which is saved for later retrieval by the {@link getMessage()} method). + * @param cause The cause (which is saved for later retrieval by the {@link getCause()} method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.) + */ + public SerialPortIOException(String message, Throwable cause) + { + super(message, cause); + } + + /** + * Constructs a {@link SerialPortIOException} with the specified cause and a detail message of {@code (cause==null ? null : cause.toString()) } + * (which typically contains the class and detail message of {@code cause}). This constructor is useful for IO exceptions that are little more + * than wrappers for other throwables. + * + * @param cause The cause (which is saved for later retrieval by the {@link getCause()} method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.) + */ + public SerialPortIOException(Throwable cause) + { + super(cause); + } +} diff --git a/src/main/java/com/fazecast/jSerialComm/SerialPortPacketListener.java b/src/main/java/com/fazecast/jSerialComm/SerialPortPacketListener.java index 4a421ea..200fdf0 100644 --- a/src/main/java/com/fazecast/jSerialComm/SerialPortPacketListener.java +++ b/src/main/java/com/fazecast/jSerialComm/SerialPortPacketListener.java @@ -31,7 +31,7 @@ package com.fazecast.jSerialComm; * Note: Using this interface will negate any serial port read timeout settings since they make no sense in an asynchronous context. * * @author Will Hedgecock <will.hedgecock@fazecast.com> - * @version 2.1.2 + * @version 2.2.0 * @see com.fazecast.jSerialComm.SerialPortDataListener * @see java.util.EventListener */ diff --git a/src/main/java/com/fazecast/jSerialComm/SerialPortTimeoutException.java b/src/main/java/com/fazecast/jSerialComm/SerialPortTimeoutException.java new file mode 100644 index 0000000..25d2505 --- /dev/null +++ b/src/main/java/com/fazecast/jSerialComm/SerialPortTimeoutException.java @@ -0,0 +1,83 @@ +/* + * SerialPortTimeoutException.java + * + * Created on: Aug 08, 2018 + * Last Updated on: Aug 08, 2018 + * Author: Will Hedgecock + * + * Copyright (C) 2018-2018 Fazecast, Inc. + * + * This file is part of jSerialComm. + * + * jSerialComm is free software: you can redistribute it and/or modify + * it under the terms of either the Apache Software License, version 2, or + * the GNU Lesser General Public License as published by the Free Software + * Foundation, version 3 or above. + * + * jSerialComm is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of both the GNU Lesser General Public + * License and the Apache Software License along with jSerialComm. If not, + * see and . + */ + +package com.fazecast.jSerialComm; + +import java.io.IOException; + +/** + * This class describes a serial port timeout exception. + * + * @author Will Hedgecock <will.hedgecock@fazecast.com> + * @version 2.2.0 + * @see java.util.EventObject + */ +public final class SerialPortTimeoutException extends IOException +{ + private static final long serialVersionUID = 3209035213903386044L; + + /** + * Constructs a {@link SerialPortTimeoutException} with {@code null} as its error detail message. + */ + public SerialPortTimeoutException() + { + super(); + } + + /** + * Constructs a {@link SerialPortTimeoutException} with the specified detail message. + * + * @param message The detail message (which is saved for later retrieval by the {@link getMessage()} method). + */ + public SerialPortTimeoutException(String message) + { + super(message); + } + + /** + * Constructs a {@link SerialPortTimeoutException} with the specified detail message and cause. + *

+ * Note that the detail message associated with {@link cause} is not automatically incorporated into this exception's detail message. + * + * @param message message The detail message (which is saved for later retrieval by the {@link getMessage()} method). + * @param cause The cause (which is saved for later retrieval by the {@link getCause()} method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.) + */ + public SerialPortTimeoutException(String message, Throwable cause) + { + super(message, cause); + } + + /** + * Constructs a {@link SerialPortTimeoutException} with the specified cause and a detail message of {@code (cause==null ? null : cause.toString()) } + * (which typically contains the class and detail message of {@code cause}). This constructor is useful for IO exceptions that are little more + * than wrappers for other throwables. + * + * @param cause The cause (which is saved for later retrieval by the {@link getCause()} method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.) + */ + public SerialPortTimeoutException(Throwable cause) + { + super(cause); + } +}