ucar.nc2.iosp.mcidas
Class Vis5DIosp

java.lang.Object
  extended by ucar.nc2.iosp.AbstractIOServiceProvider
      extended by ucar.nc2.iosp.mcidas.Vis5DIosp
All Implemented Interfaces:
IOServiceProvider

public class Vis5DIosp
extends AbstractIOServiceProvider

Vis5D grid file reader. Only support Vis5D grids, not the TOPO files.

Author:
Unidata Development Team

Nested Class Summary
protected static class Vis5DIosp.MakeNetcdfFile
          TODO: generalize this static class for testing
 class Vis5DIosp.Vis5DLookup
          Get all the information about a Vis5D file
 
Constructor Summary
Vis5DIosp()
           
 
Method Summary
 void close()
          Close this IOSP
 String getFileTypeDescription()
          Get the file type description
 String getFileTypeId()
          Get the file type id
 boolean isValidFile(RandomAccessFile raf)
          Is this a valid file?
static void main(String[] args)
          Test this.
 void open(RandomAccessFile raf, NetcdfFile ncfile, CancelTask cancelTask)
          Open the service provider for reading.
 Array readData(Variable v2, Section section)
          Read the data for the variable
 
Methods inherited from class ucar.nc2.iosp.AbstractIOServiceProvider
getDetailInfo, getFileTypeVersion, getStructureIterator, readSection, readToByteChannel, sendIospMessage, sync, syncExtend, toStringDebug
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Vis5DIosp

public Vis5DIosp()
Method Detail

isValidFile

public boolean isValidFile(RandomAccessFile raf)
                    throws IOException
Is this a valid file?

Parameters:
raf - RandomAccessFile to check
Returns:
true if a valid McIDAS AREA file
Throws:
IOException - problem reading file

getFileTypeId

public String getFileTypeId()
Get the file type id

Returns:
the file type id
See Also:
"http://www.unidata.ucar.edu/software/netcdf-java/formats/FileTypes.html"

getFileTypeDescription

public String getFileTypeDescription()
Get the file type description

Returns:
the file type description
See Also:
"http://www.unidata.ucar.edu/software/netcdf-java/formats/FileTypes.html"

open

public void open(RandomAccessFile raf,
                 NetcdfFile ncfile,
                 CancelTask cancelTask)
          throws IOException
Open the service provider for reading.

Specified by:
open in interface IOServiceProvider
Overrides:
open in class AbstractIOServiceProvider
Parameters:
raf - file to read from
ncfile - netCDF file we are writing to (memory)
cancelTask - task for cancelling
Throws:
IOException - problem reading file

readData

public Array readData(Variable v2,
                      Section section)
               throws IOException,
                      InvalidRangeException
Read the data for the variable

Parameters:
v2 - Variable to read
section - section infomation
Returns:
Array of data
Throws:
IOException - problem reading from file
InvalidRangeException - invalid Range
See Also:
Range

close

public void close()
           throws IOException
Close this IOSP

Specified by:
close in interface IOServiceProvider
Overrides:
close in class AbstractIOServiceProvider
Throws:
IOException - problem closing file

main

public static void main(String[] args)
                 throws IOException
Test this.

Parameters:
args - [0] input file name [0] output file name
Throws:
IOException - problem reading the file


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.