Commit 5c7802ab authored by Ole Streicher's avatar Ole Streicher

Pro-actively add a markSupported() method

parent f377551c
......@@ -3,13 +3,13 @@ Date: Mon, 20 Feb 2017 13:28:16 +0100
Subject: Use latest nom.tam.fits API
---
src/main/uk/ac/starlink/fits/AbstractArrayDataIO.java | 4 ++++
src/main/uk/ac/starlink/fits/FitsConstants.java | 6 +++---
src/main/uk/ac/starlink/fits/FitsTableBuilder.java | 4 ++--
src/main/uk/ac/starlink/fits/MappedFile.java | 19 ++++++++++++++++++-
src/main/uk/ac/starlink/fits/MultiMappedFile.java | 17 +++++++++++++++++
.../uk/ac/starlink/fits/WritableFitsArrayImpl.java | 2 +-
6 files changed, 45 insertions(+), 7 deletions(-)
.../uk/ac/starlink/fits/AbstractArrayDataIO.java | 4 ++++
src/main/uk/ac/starlink/fits/FitsConstants.java | 6 +++---
src/main/uk/ac/starlink/fits/FitsTableBuilder.java | 4 ++--
src/main/uk/ac/starlink/fits/MappedFile.java | 23 +++++++++++++++++++++-
src/main/uk/ac/starlink/fits/MultiMappedFile.java | 21 ++++++++++++++++++++
.../uk/ac/starlink/fits/WritableFitsArrayImpl.java | 2 +-
6 files changed, 53 insertions(+), 7 deletions(-)
diff --git a/src/main/uk/ac/starlink/fits/AbstractArrayDataIO.java b/src/main/uk/ac/starlink/fits/AbstractArrayDataIO.java
index 24065f6..8b81173 100644
......@@ -80,7 +80,7 @@ index 121d4d0..0bca02a 100644
}
diff --git a/src/main/uk/ac/starlink/fits/MappedFile.java b/src/main/uk/ac/starlink/fits/MappedFile.java
index 3116315..082bc39 100644
index 3116315..b703097 100644
--- a/src/main/uk/ac/starlink/fits/MappedFile.java
+++ b/src/main/uk/ac/starlink/fits/MappedFile.java
@@ -106,11 +106,19 @@ public class MappedFile extends AbstractArrayDataIO implements RandomAccess {
......@@ -104,10 +104,14 @@ index 3116315..082bc39 100644
}
protected byte get() throws IOException {
@@ -169,6 +177,15 @@ public class MappedFile extends AbstractArrayDataIO implements RandomAccess {
@@ -169,6 +177,19 @@ public class MappedFile extends AbstractArrayDataIO implements RandomAccess {
}
}
+ public boolean markSupported() {
+ return false;
+ }
+
+ public void reset() throws IOException {
+ throw new IOException( "mark/reset not supported" );
+
......@@ -121,7 +125,7 @@ index 3116315..082bc39 100644
* Returns a mapped byte buffer which results from mapping a given file.
*
diff --git a/src/main/uk/ac/starlink/fits/MultiMappedFile.java b/src/main/uk/ac/starlink/fits/MultiMappedFile.java
index 6d9a3cd..a165d48 100644
index 6d9a3cd..b8ae3c6 100644
--- a/src/main/uk/ac/starlink/fits/MultiMappedFile.java
+++ b/src/main/uk/ac/starlink/fits/MultiMappedFile.java
@@ -101,6 +101,14 @@ public class MultiMappedFile extends AbstractArrayDataIO
......@@ -139,10 +143,14 @@ index 6d9a3cd..a165d48 100644
public int skipBytes( int toSkip ) throws IOException {
return toInt( skip( (long) toSkip ) );
};
@@ -193,6 +201,15 @@ public class MultiMappedFile extends AbstractArrayDataIO
@@ -193,6 +201,19 @@ public class MultiMappedFile extends AbstractArrayDataIO
}
}
+ public boolean markSupported() {
+ return false;
+ }
+
+ public void reset() throws IOException {
+ throw new IOException( "mark/reset not supported" );
+
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment