public void close() throws ApfloatRuntimeException {
      if ((this.mode & WRITE) != 0 && getData() != null) {
        final double[] array = getDoubleData();
        ReadableByteChannel in =
            new ReadableByteChannel() {
              public int read(ByteBuffer buffer) {
                DoubleBuffer dst = buffer.asDoubleBuffer();
                int writeLength = dst.remaining();

                dst.put(array, this.writePosition, writeLength);

                this.writePosition += writeLength;
                buffer.position(buffer.position() + writeLength * 8);

                return writeLength * 8;
              }

              public void close() {}

              public boolean isOpen() {
                return true;
              }

              private int writePosition = 0;
            };

        transferFrom(in, this.fileOffset * 8, (long) array.length * 8);
      }

      super.close();
    }
 public void close() throws ApfloatRuntimeException {
   if ((this.mode & WRITE) != 0 && getData() != null) {
     setTransposedArray(this, this.startColumn, this.columns, this.rows);
   }
   super.close();
 }