visad.data.hrit
Class HRITForm
- java.lang.Object
-
- visad.data.FormNode
-
- visad.data.Form
-
- visad.data.hrit.HRITForm
-
- All Implemented Interfaces:
- FormFileInformer
public class HRITForm extends Form implements FormFileInformer
to allow determination of whether a data file is of type HRIT
-
-
Constructor Summary
Constructors Constructor and Description HRITForm()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidadd(java.lang.String id, Data data, boolean replace)This has not been implementedjava.lang.String[]getDefaultSuffixes()return a list of suffixes associated with this file typeFormNodegetForms(Data data)not implemented yetbooleanisThisType(byte[] block)This method will be used to identify an HRIT file by examining the contents of the first block of data values.booleanisThisType(java.lang.String name)determine the file type by name.DataImplopen(java.lang.String path)read the HRIT file from local disk, and return the HRIT data as a DataImpl object (a FlatField).DataImplopen(java.net.URL url)read the HRIT file from a URL, and return the HRIT file as a DataImpl object (a FlatField).voidsave(java.lang.String id, Data data, boolean replace)save the file back to disk This has not been implemented yet-
Methods inherited from class visad.data.Form
getMathType
-
-
-
-
Method Detail
-
isThisType
public boolean isThisType(java.lang.String name)
determine the file type by name. At present we are only checking for MSG2 HRIT files. This will change.- Specified by:
isThisTypein interfaceFormFileInformer- Parameters:
name- is the filename in question- Returns:
- true if the name is right for this type of form
-
isThisType
public boolean isThisType(byte[] block)
This method will be used to identify an HRIT file by examining the contents of the first block of data values. Presently unimplemented.- Specified by:
isThisTypein interfaceFormFileInformer- Parameters:
block- is an array of ? length from the beginning of the file in question.- Returns:
- true if the magic number is right
-
getDefaultSuffixes
public java.lang.String[] getDefaultSuffixes()
return a list of suffixes associated with this file type- Specified by:
getDefaultSuffixesin interfaceFormFileInformer- Returns:
- array of suffixes
-
save
public void save(java.lang.String id, Data data, boolean replace) throws BadFormException, java.io.IOException, java.rmi.RemoteException, VisADExceptionsave the file back to disk This has not been implemented yet- Specified by:
savein classFormNode- Throws:
BadFormExceptionjava.io.IOExceptionjava.rmi.RemoteExceptionVisADException
-
add
public void add(java.lang.String id, Data data, boolean replace) throws BadFormExceptionThis has not been implemented- Specified by:
addin classFormNode- Throws:
BadFormException
-
open
public DataImpl open(java.lang.String path) throws BadFormException, java.rmi.RemoteException, VisADException
read the HRIT file from local disk, and return the HRIT data as a DataImpl object (a FlatField).- Specified by:
openin classFormNode- Parameters:
path- is the fully-qualified pathname- Throws:
BadFormExceptionjava.rmi.RemoteExceptionVisADException
-
open
public DataImpl open(java.net.URL url) throws BadFormException, VisADException, java.io.IOException
read the HRIT file from a URL, and return the HRIT file as a DataImpl object (a FlatField).- Specified by:
openin classFormNode- Parameters:
url- is the fully-formed URL- Throws:
BadFormExceptionVisADExceptionjava.io.IOException
-
-
DMelt 3.0 © DataMelt by jWork.ORG