public class FitsFileWriter extends Object implements Closeable
| Modifier and Type | Class and Description |
|---|---|
static class |
FitsFileWriter.FitsIOException |
| Modifier and Type | Method and Description |
|---|---|
Future<Integer> |
asyncWrite(String imageExtensionName,
ByteBuffer src)
Write a buffer to an image extension asynchronously
|
<A> void |
asyncWrite(String imageExtensionName,
ByteBuffer src,
A attachment,
CompletionHandler<Integer,? super A> handler)
Write a buffer to an image extension asynchronously
|
void |
close() |
void |
createHDUs(ImageSet images,
MetaDataSet metaDataSet,
List<FitsHeaderMetadataProvider> providers,
RawImageData.BitsPerPixel bits,
Map<String,HeaderSpecification> specs)
Complete initialization of a file created with the single argument constructor
|
int |
write(String imageExtensionName,
ByteBuffer src)
Write the actual image data to the file.
|
@Deprecated public FitsFileWriter(File file, ImageSet images) throws IOException, nom.tam.fits.FitsException
file - The name of the output fits fileimages - The ImageSet of images to write in the Data extended
headers. Note that this specifies the images to write, not the actual
data for the images.IOExceptionnom.tam.fits.FitsExceptionpublic FitsFileWriter(File file, ImageSet images, Map<String,HeaderSpecification> specs) throws IOException, nom.tam.fits.FitsException
IOExceptionnom.tam.fits.FitsException@Deprecated public FitsFileWriter(File file, ImageSet images, MetaDataSet metaDataSet) throws IOException, nom.tam.fits.FitsException
IOExceptionnom.tam.fits.FitsExceptionpublic FitsFileWriter(File file, ImageSet images, Map<String,HeaderSpecification> specs, MetaDataSet metaDataSet) throws IOException, nom.tam.fits.FitsException
IOExceptionnom.tam.fits.FitsExceptionpublic FitsFileWriter(File file, ImageSet images, MetaDataSet metaDataSet, List<FitsHeaderMetadataProvider> providers) throws IOException, nom.tam.fits.FitsException
IOExceptionnom.tam.fits.FitsException@Deprecated public FitsFileWriter(File file, ImageSet images, List<FitsHeaderMetadataProvider> providers) throws IOException, nom.tam.fits.FitsException
IOExceptionnom.tam.fits.FitsExceptionpublic FitsFileWriter(File file, ImageSet images, Map<String,HeaderSpecification> specs, List<FitsHeaderMetadataProvider> providers) throws IOException, nom.tam.fits.FitsException
IOExceptionnom.tam.fits.FitsException@Deprecated public FitsFileWriter(File file, ImageSet images, MetaDataSet metaDataSet, List<FitsHeaderMetadataProvider> providers, RawImageData.BitsPerPixel bits) throws IOException, nom.tam.fits.FitsException
IOExceptionnom.tam.fits.FitsExceptionpublic FitsFileWriter(File file, ImageSet images, MetaDataSet metaDataSet, List<FitsHeaderMetadataProvider> providers, RawImageData.BitsPerPixel bits, Map<String,HeaderSpecification> specs) throws IOException, nom.tam.fits.FitsException
file - The name of the output fits fileimages - The ImageSet of images to write in the Data extended
headers. Note that this specifies the images to write, not the actual
data for the images.metaDataSet - The meta-data maps to use to extract header info fromproviders - bits - The number of bits per pixel for imagesspecs - The spec files used to create FITS file headersIOExceptionnom.tam.fits.FitsExceptionpublic FitsFileWriter(File file) throws IOException
file - The file to writeIOExceptionpublic void createHDUs(ImageSet images, MetaDataSet metaDataSet, List<FitsHeaderMetadataProvider> providers, RawImageData.BitsPerPixel bits, Map<String,HeaderSpecification> specs) throws IOException, nom.tam.fits.FitsException
images - The ImageSet of images to write in the Data extended
headers. Note that this specifies the images to write, not the actual
data for the images.metaDataSet - The meta-data maps to use to extract header info fromproviders - bits - The number of bits per pixel for imagesspecs - The spec files used to create FITS file headersIOExceptionnom.tam.fits.FitsExceptionpublic int write(String imageExtensionName, ByteBuffer src) throws IOException
imageExtensionName - The image extension name to which this data is
to be writtensrc - The imageIOException - If an IOException is generated, or if more data is
sent than was expected for a particular image.public Future<Integer> asyncWrite(String imageExtensionName, ByteBuffer src) throws IOException
imageExtensionName - The image extension name to which this data is
to be writtensrc - The buffer to writeIOException - If the operation cannot be queued.public <A> void asyncWrite(String imageExtensionName, ByteBuffer src, A attachment, CompletionHandler<Integer,? super A> handler) throws IOException
A - The type of the attachmentimageExtensionName - The image extension name to which this data is
to be writtensrc - The buffer to writeattachment - The object to attach to the I/O operation; can be nullhandler - The handler for consuming the resultIOException - If the operation cannot be queued.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2022 LSST. All rights reserved.