diff options
author | Sven Gothel <[email protected]> | 2023-01-01 02:15:14 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-01-01 02:15:14 +0100 |
commit | 044ffa135c167b05f31a4cb7d2ad8953e7a9d671 (patch) | |
tree | 881a68bd9fb0934d69cafe450174a19576d41288 /java_jni/org/jau/io | |
parent | ed0a58e3cc969059f6e3cbfa88424bd7c12cc176 (diff) |
Add jau::io::iostate::timeout, allowing to denote transmission abort by timeout (Transparent through iostate_func)
Diffstat (limited to 'java_jni/org/jau/io')
-rw-r--r-- | java_jni/org/jau/io/ByteInStream.java | 2 | ||||
-rw-r--r-- | java_jni/org/jau/io/ByteInStream_Feed.java | 5 | ||||
-rw-r--r-- | java_jni/org/jau/io/ByteInStream_File.java | 5 | ||||
-rw-r--r-- | java_jni/org/jau/io/ByteInStream_URL.java | 5 | ||||
-rw-r--r-- | java_jni/org/jau/io/ByteOutStream.java | 2 | ||||
-rw-r--r-- | java_jni/org/jau/io/ByteOutStream_File.java | 5 | ||||
-rw-r--r-- | java_jni/org/jau/io/IOState.java | 7 | ||||
-rw-r--r-- | java_jni/org/jau/io/IOStateFunc.java | 5 |
8 files changed, 27 insertions, 9 deletions
diff --git a/java_jni/org/jau/io/ByteInStream.java b/java_jni/org/jau/io/ByteInStream.java index 9303635..b537e0e 100644 --- a/java_jni/org/jau/io/ByteInStream.java +++ b/java_jni/org/jau/io/ByteInStream.java @@ -1,6 +1,6 @@ /** * Author: Sven Gothel <[email protected]> - * Copyright (c) 2022 Gothel Software e.K. + * Copyright (c) 2022-2023 Gothel Software e.K. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the diff --git a/java_jni/org/jau/io/ByteInStream_Feed.java b/java_jni/org/jau/io/ByteInStream_Feed.java index ceb9127..acbb648 100644 --- a/java_jni/org/jau/io/ByteInStream_Feed.java +++ b/java_jni/org/jau/io/ByteInStream_Feed.java @@ -1,6 +1,6 @@ /** * Author: Sven Gothel <[email protected]> - * Copyright (c) 2022 Gothel Software e.K. + * Copyright (c) 2022-2023 Gothel Software e.K. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -104,6 +104,9 @@ public final class ByteInStream_Feed implements ByteInStream { public native boolean bad(); @Override + public native boolean timeout(); + + @Override public boolean end_of_data() { return !good(); } @Override diff --git a/java_jni/org/jau/io/ByteInStream_File.java b/java_jni/org/jau/io/ByteInStream_File.java index de75de6..9af4639 100644 --- a/java_jni/org/jau/io/ByteInStream_File.java +++ b/java_jni/org/jau/io/ByteInStream_File.java @@ -1,6 +1,6 @@ /** * Author: Sven Gothel <[email protected]> - * Copyright (c) 2022 Gothel Software e.K. + * Copyright (c) 2022-2023 Gothel Software e.K. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -157,6 +157,9 @@ public final class ByteInStream_File implements ByteInStream { public native boolean bad(); @Override + public native boolean timeout(); + + @Override public boolean end_of_data() { return !good(); } @Override diff --git a/java_jni/org/jau/io/ByteInStream_URL.java b/java_jni/org/jau/io/ByteInStream_URL.java index a9e79ad..7ae2b38 100644 --- a/java_jni/org/jau/io/ByteInStream_URL.java +++ b/java_jni/org/jau/io/ByteInStream_URL.java @@ -1,6 +1,6 @@ /** * Author: Sven Gothel <[email protected]> - * Copyright (c) 2022 Gothel Software e.K. + * Copyright (c) 2022-2023 Gothel Software e.K. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -108,6 +108,9 @@ public final class ByteInStream_URL implements ByteInStream { public native boolean bad(); @Override + public native boolean timeout(); + + @Override public boolean end_of_data() { return !good(); } @Override diff --git a/java_jni/org/jau/io/ByteOutStream.java b/java_jni/org/jau/io/ByteOutStream.java index 9862906..f65f6e6 100644 --- a/java_jni/org/jau/io/ByteOutStream.java +++ b/java_jni/org/jau/io/ByteOutStream.java @@ -1,6 +1,6 @@ /** * Author: Sven Gothel <[email protected]> - * Copyright (c) 2022 Gothel Software e.K. + * Copyright (c) 2022-2023 Gothel Software e.K. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the diff --git a/java_jni/org/jau/io/ByteOutStream_File.java b/java_jni/org/jau/io/ByteOutStream_File.java index 53ca9d7..5868f8d 100644 --- a/java_jni/org/jau/io/ByteOutStream_File.java +++ b/java_jni/org/jau/io/ByteOutStream_File.java @@ -1,6 +1,6 @@ /** * Author: Sven Gothel <[email protected]> - * Copyright (c) 2022 Gothel Software e.K. + * Copyright (c) 2022-2023 Gothel Software e.K. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -164,6 +164,9 @@ public final class ByteOutStream_File implements ByteOutStream { public native boolean bad(); @Override + public native boolean timeout(); + + @Override public native int write(final byte[] in, final int offset, final int length); @Override diff --git a/java_jni/org/jau/io/IOState.java b/java_jni/org/jau/io/IOState.java index b5e5eb3..6e4ae1f 100644 --- a/java_jni/org/jau/io/IOState.java +++ b/java_jni/org/jau/io/IOState.java @@ -1,6 +1,6 @@ /** * Author: Sven Gothel <[email protected]> - * Copyright (c) 2022 Gothel Software e.K. + * Copyright (c) 2021-2023 Gothel Software e.K. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -45,7 +45,10 @@ public class IOState { eofbit ( 1 << 1 ), /** Input or output operation failed (formatting or extraction error). */ - failbit ( 1 << 2 ); + failbit ( 1 << 2 ), + + /** Input or output operation failed due to timeout. */ + timeout ( 1 << 3 ); Bit(final int v) { value = v; } public final int value; diff --git a/java_jni/org/jau/io/IOStateFunc.java b/java_jni/org/jau/io/IOStateFunc.java index 02fa759..f920423 100644 --- a/java_jni/org/jau/io/IOStateFunc.java +++ b/java_jni/org/jau/io/IOStateFunc.java @@ -1,6 +1,6 @@ /** * Author: Sven Gothel <[email protected]> - * Copyright (c) 2022 Gothel Software e.K. + * Copyright (c) 2022-2023 Gothel Software e.K. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -56,4 +56,7 @@ public interface IOStateFunc { /** Checks if a non-recoverable error has occurred. */ boolean bad(); + + /** Checks if a timeout (non-recoverable) has occurred. */ + boolean timeout(); } |