Commit 3c720617 authored by Ole Streicher's avatar Ole Streicher

Set hierarch use in nom.tam.fits

parent 6665b952
......@@ -20,29 +20,14 @@ https://github.com/nom-tam-fits/nom-tam-fits/issues/114
Depending on the result of the PR, this patch may be simplified.
---
src/main/nom/tam/fits/HeaderOrder.java | 8 ++++++++
.../uk/ac/starlink/fits/AbstractArrayDataIO.java | 4 ++++
src/main/uk/ac/starlink/fits/AbstractWideFits.java | 1 +
src/main/uk/ac/starlink/fits/FitsConstants.java | 6 +++---
src/main/uk/ac/starlink/fits/MappedFile.java | 20 ++++++++++++++++++++
src/main/uk/ac/starlink/fits/MultiMappedFile.java | 20 ++++++++++++++++++++
.../uk/ac/starlink/fits/WritableFitsArrayImpl.java | 2 +-
6 files changed, 56 insertions(+), 4 deletions(-)
create mode 100644 src/main/nom/tam/fits/HeaderOrder.java
6 files changed, 49 insertions(+), 4 deletions(-)
diff --git a/src/main/nom/tam/fits/HeaderOrder.java b/src/main/nom/tam/fits/HeaderOrder.java
new file mode 100644
index 0000000..a9835b4
--- /dev/null
+++ b/src/main/nom/tam/fits/HeaderOrder.java
@@ -0,0 +1,8 @@
+package nom.tam.fits;
+
+public class HeaderOrder implements java.util.Comparator<String> {
+ @Override
+ public int compare(String c1, String c2) {
+ return 0;
+ }
+}
diff --git a/src/main/uk/ac/starlink/fits/AbstractArrayDataIO.java b/src/main/uk/ac/starlink/fits/AbstractArrayDataIO.java
index 24065f6..8b81173 100644
--- a/src/main/uk/ac/starlink/fits/AbstractArrayDataIO.java
......@@ -58,8 +43,20 @@ index 24065f6..8b81173 100644
private int primitiveArrayRecurse( Object o, int nread )
throws IOException {
if ( o == null ) {
diff --git a/src/main/uk/ac/starlink/fits/AbstractWideFits.java b/src/main/uk/ac/starlink/fits/AbstractWideFits.java
index 4a5ac4a..415bdae 100644
--- a/src/main/uk/ac/starlink/fits/AbstractWideFits.java
+++ b/src/main/uk/ac/starlink/fits/AbstractWideFits.java
@@ -375,6 +375,7 @@ public abstract class AbstractWideFits implements WideFits {
* @param isRead true for read, false for write
*/
private void checkHasHierarch( boolean isRead ) {
+ FitsFactory.setUseHierarch( true );
if ( ! FitsFactory.getUseHierarch() ) {
logger_.severe( "FitsFactory.useHierarch=false: "
+ "HIERARCH-based wide FITS table convention "
diff --git a/src/main/uk/ac/starlink/fits/FitsConstants.java b/src/main/uk/ac/starlink/fits/FitsConstants.java
index 43a9689..f45e0fa 100644
index aa59778..dd6db47 100644
--- a/src/main/uk/ac/starlink/fits/FitsConstants.java
+++ b/src/main/uk/ac/starlink/fits/FitsConstants.java
@@ -42,7 +42,7 @@ public class FitsConstants {
......@@ -71,7 +68,7 @@ index 43a9689..f45e0fa 100644
"END " +
" " );
@@ -225,7 +225,7 @@ public class FitsConstants {
@@ -228,7 +228,7 @@ public class FitsConstants {
while ( need > 0 ) {
int len = strm.read( buffer, 80 - need, need );
if ( len <= 0 ) {
......@@ -80,7 +77,7 @@ index 43a9689..f45e0fa 100644
}
need -= len;
}
@@ -239,7 +239,7 @@ public class FitsConstants {
@@ -242,7 +242,7 @@ public class FitsConstants {
}
String cbuf = new String( buffer );
......
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