SerialPortTimeoutException inherits from InterruptedIOException
This commit is contained in:
parent
cf83167b67
commit
c8104123ae
|
@ -42,7 +42,7 @@ import java.util.Date;
|
||||||
* This class provides native access to serial ports and devices without requiring external libraries or tools.
|
* This class provides native access to serial ports and devices without requiring external libraries or tools.
|
||||||
*
|
*
|
||||||
* @author Will Hedgecock <will.hedgecock@fazecast.com>
|
* @author Will Hedgecock <will.hedgecock@fazecast.com>
|
||||||
* @version 2.2.0
|
* @version 2.2.1
|
||||||
* @see java.io.InputStream
|
* @see java.io.InputStream
|
||||||
* @see java.io.OutputStream
|
* @see java.io.OutputStream
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -31,7 +31,7 @@ import java.util.EventListener;
|
||||||
* This interface must be implemented to enable simple event-based serial port I/O.
|
* This interface must be implemented to enable simple event-based serial port I/O.
|
||||||
*
|
*
|
||||||
* @author Will Hedgecock <will.hedgecock@fazecast.com>
|
* @author Will Hedgecock <will.hedgecock@fazecast.com>
|
||||||
* @version 2.2.0
|
* @version 2.2.1
|
||||||
* @see java.util.EventListener
|
* @see java.util.EventListener
|
||||||
*/
|
*/
|
||||||
public interface SerialPortDataListener extends EventListener
|
public interface SerialPortDataListener extends EventListener
|
||||||
|
|
|
@ -31,7 +31,7 @@ import java.util.EventObject;
|
||||||
* This class describes an asynchronous serial port event.
|
* This class describes an asynchronous serial port event.
|
||||||
*
|
*
|
||||||
* @author Will Hedgecock <will.hedgecock@fazecast.com>
|
* @author Will Hedgecock <will.hedgecock@fazecast.com>
|
||||||
* @version 2.2.0
|
* @version 2.2.1
|
||||||
* @see java.util.EventObject
|
* @see java.util.EventObject
|
||||||
*/
|
*/
|
||||||
public final class SerialPortEvent extends EventObject
|
public final class SerialPortEvent extends EventObject
|
||||||
|
|
|
@ -31,7 +31,7 @@ import java.io.IOException;
|
||||||
* This class describes a serial port IO exception.
|
* This class describes a serial port IO exception.
|
||||||
*
|
*
|
||||||
* @author Will Hedgecock <will.hedgecock@fazecast.com>
|
* @author Will Hedgecock <will.hedgecock@fazecast.com>
|
||||||
* @version 2.2.0
|
* @version 2.2.1
|
||||||
* @see java.io.IOException
|
* @see java.io.IOException
|
||||||
*/
|
*/
|
||||||
public final class SerialPortIOException extends IOException
|
public final class SerialPortIOException extends IOException
|
||||||
|
|
|
@ -31,7 +31,7 @@ package com.fazecast.jSerialComm;
|
||||||
* <i>Note</i>: Using this interface will negate any serial port read timeout settings since they make no sense in an asynchronous context.
|
* <i>Note</i>: 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>
|
* @author Will Hedgecock <will.hedgecock@fazecast.com>
|
||||||
* @version 2.2.0
|
* @version 2.2.1
|
||||||
* @see com.fazecast.jSerialComm.SerialPortDataListener
|
* @see com.fazecast.jSerialComm.SerialPortDataListener
|
||||||
* @see java.util.EventListener
|
* @see java.util.EventListener
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* SerialPortTimeoutException.java
|
* SerialPortTimeoutException.java
|
||||||
*
|
*
|
||||||
* Created on: Aug 08, 2018
|
* Created on: Aug 08, 2018
|
||||||
* Last Updated on: Aug 08, 2018
|
* Last Updated on: Aug 20, 2018
|
||||||
* Author: Will Hedgecock
|
* Author: Will Hedgecock
|
||||||
*
|
*
|
||||||
* Copyright (C) 2018-2018 Fazecast, Inc.
|
* Copyright (C) 2018-2018 Fazecast, Inc.
|
||||||
|
@ -25,16 +25,16 @@
|
||||||
|
|
||||||
package com.fazecast.jSerialComm;
|
package com.fazecast.jSerialComm;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.InterruptedIOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class describes a serial port timeout exception.
|
* This class describes a serial port timeout exception.
|
||||||
*
|
*
|
||||||
* @author Will Hedgecock <will.hedgecock@fazecast.com>
|
* @author Will Hedgecock <will.hedgecock@fazecast.com>
|
||||||
* @version 2.2.0
|
* @version 2.2.1
|
||||||
* @see java.io.IOException
|
* @see java.io.InterruptedIOException
|
||||||
*/
|
*/
|
||||||
public final class SerialPortTimeoutException extends IOException
|
public final class SerialPortTimeoutException extends InterruptedIOException
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 3209035213903386044L;
|
private static final long serialVersionUID = 3209035213903386044L;
|
||||||
|
|
||||||
|
@ -44,6 +44,7 @@ public final class SerialPortTimeoutException extends IOException
|
||||||
public SerialPortTimeoutException()
|
public SerialPortTimeoutException()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
|
bytesTransferred = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -54,30 +55,6 @@ public final class SerialPortTimeoutException extends IOException
|
||||||
public SerialPortTimeoutException(String message)
|
public SerialPortTimeoutException(String message)
|
||||||
{
|
{
|
||||||
super(message);
|
super(message);
|
||||||
}
|
bytesTransferred = 0;
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a {@link SerialPortTimeoutException} with the specified detail message and cause.
|
|
||||||
* <p>
|
|
||||||
* Note that the detail message associated with {@link cause} is <i>not</i> 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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ import java.util.Scanner;
|
||||||
* This class provides a test case for the jSerialComm library.
|
* This class provides a test case for the jSerialComm library.
|
||||||
*
|
*
|
||||||
* @author Will Hedgecock <will.hedgecock@gmail.com>
|
* @author Will Hedgecock <will.hedgecock@gmail.com>
|
||||||
* @version 2.1.2
|
* @version 2.2.1
|
||||||
* @see java.io.InputStream
|
* @see java.io.InputStream
|
||||||
* @see java.io.OutputStream
|
* @see java.io.OutputStream
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue