public class FitsPlusTableBuilder
extends java.lang.Object
implements uk.ac.starlink.table.TableBuilder, uk.ac.starlink.table.MultiTableBuilder
FitsPlusTableWriter
). This looks for a primary header
in the FITS file which contains the VOTMETA header (in fact it is
quite inflexible about what it recognises as this format -
see isMagic(byte[])
) and tries to interpret the data array as a
1-d array of bytes representing the XML of a VOTable document.
This VOTable document should have one or more TABLE elements with no DATA
content - the table data is got from the extension extension HDUs,
one per table, and they must be BINTABLE extensions matching the
metadata described by the VOTable.
The point of all this is so that you can store VOTables in the efficient FITS format (it can be mapped if it's on local disk, which makes table creation practically instantaneous, even for random access) without sacrificing any of the metadata that you want to encode in VOTable format.
FitsPlusTableWriter
Constructor and Description |
---|
FitsPlusTableBuilder() |
Modifier and Type | Method and Description |
---|---|
boolean |
canImport(java.awt.datatransfer.DataFlavor flavor)
Returns true for a flavor with the MIME type "application/fits".
|
java.lang.String |
getFormatName() |
static boolean |
isMagic(byte[] buffer)
Tests whether a given buffer contains bytes which might be the
first few bytes of a FitsPlus table.
|
uk.ac.starlink.table.StarTable |
makeStarTable(uk.ac.starlink.util.DataSource datsrc,
boolean wantRandom,
uk.ac.starlink.table.StoragePolicy storagePolicy) |
uk.ac.starlink.table.TableSequence |
makeStarTables(uk.ac.starlink.util.DataSource datsrc,
uk.ac.starlink.table.StoragePolicy storagePolicy) |
void |
streamStarTable(java.io.InputStream in,
uk.ac.starlink.table.TableSink sink,
java.lang.String pos) |
public java.lang.String getFormatName()
getFormatName
in interface uk.ac.starlink.table.TableBuilder
public uk.ac.starlink.table.StarTable makeStarTable(uk.ac.starlink.util.DataSource datsrc, boolean wantRandom, uk.ac.starlink.table.StoragePolicy storagePolicy) throws java.io.IOException
makeStarTable
in interface uk.ac.starlink.table.TableBuilder
java.io.IOException
public uk.ac.starlink.table.TableSequence makeStarTables(uk.ac.starlink.util.DataSource datsrc, uk.ac.starlink.table.StoragePolicy storagePolicy) throws java.io.IOException
makeStarTables
in interface uk.ac.starlink.table.MultiTableBuilder
java.io.IOException
public void streamStarTable(java.io.InputStream in, uk.ac.starlink.table.TableSink sink, java.lang.String pos) throws java.io.IOException
streamStarTable
in interface uk.ac.starlink.table.TableBuilder
java.io.IOException
public boolean canImport(java.awt.datatransfer.DataFlavor flavor)
canImport
in interface uk.ac.starlink.table.TableBuilder
public static boolean isMagic(byte[] buffer)
SIMPLE = T BITPIX = 8 NAXIS = 1 NAXIS1 = ??? VOTMETA = T
buffer
- byte buffer containing leading few bytes of dataCopyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.