uk.ac.starlink.table.TableBuilderAllWiseTableBuilder.Count, AllWiseTableBuilder.NoCountpublic class AllWiseTableBuilder
extends java.lang.Object
implements uk.ac.starlink.table.TableBuilder
For FITS output (though not colfits) two passes through the input ASCII file are required, the first one (much faster) just to count the rows. There are therefore two variants of this input handler, one which does a row count and one which does not. If the row count is known, it would be possible to adapt this handler so you tell it the row count up front and only one pass is required.
| Modifier and Type | Class | Description |
|---|---|---|
static class |
AllWiseTableBuilder.Count |
Input handler which reads AllWise ASCII files and does count the
rows first.
|
static class |
AllWiseTableBuilder.NoCount |
Input handler which reads AllWise ASCII files and does not count
the rows first.
|
| Constructor | Description |
|---|---|
AllWiseTableBuilder() |
Default mode constructor.
|
AllWiseTableBuilder(java.lang.String name,
boolean preCount) |
Configurable constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
canImport(java.awt.datatransfer.DataFlavor flavor) |
|
static long |
countLines(uk.ac.starlink.util.DataSource datsrc) |
Counts the lines in the ASCII file at the given location.
|
java.lang.String |
getFormatName() |
|
uk.ac.starlink.table.StarTable |
makeStarTable(uk.ac.starlink.util.DataSource datsrc,
boolean wantRandom,
uk.ac.starlink.table.StoragePolicy storagePolicy) |
|
void |
streamStarTable(java.io.InputStream in,
uk.ac.starlink.table.TableSink sink,
java.lang.String pos) |
public AllWiseTableBuilder()
public AllWiseTableBuilder(java.lang.String name,
boolean preCount)
name - handler namepreCount - true to return a table that knows its row countpublic boolean canImport(java.awt.datatransfer.DataFlavor flavor)
canImport in interface uk.ac.starlink.table.TableBuilderpublic java.lang.String getFormatName()
getFormatName in interface uk.ac.starlink.table.TableBuilderpublic 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.TableBuilderjava.io.IOExceptionpublic void streamStarTable(java.io.InputStream in,
uk.ac.starlink.table.TableSink sink,
java.lang.String pos)
streamStarTable in interface uk.ac.starlink.table.TableBuilderpublic static long countLines(uk.ac.starlink.util.DataSource datsrc)
throws java.io.IOException
datsrc - data sourcejava.io.IOExceptionCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.