visad.data.vis5d
Class Vis5DTopoForm
- java.lang.Object
-
- visad.data.FormNode
-
- visad.data.Form
-
- visad.data.vis5d.Vis5DTopoForm
-
- All Implemented Interfaces:
- FormFileInformer
public class Vis5DTopoForm extends Form implements FormFileInformer
Vis5DTopoForm is the VisAD data format adapter for Vis5D topography files.
-
-
Constructor Summary
Constructors Constructor and Description Vis5DTopoForm()Create a new Vis5DTopoForm
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidadd(java.lang.String id, Data data, boolean replace)Add data to an existing data object.java.lang.String[]getDefaultSuffixes()Get default suffixes for Vis5D topography filesFormNodegetForms(Data data)Return the data forms that are compatible with a data object.booleanisThisType(byte[] block)Check to see if the block contains the magic numberbooleanisThisType(java.lang.String name)Check to see if the file name might be right for this form.DataImplopen(java.io.InputStream in)Returns a VisAD data object corresponding to an input stream for a Vis5DTopography file.DataImplopen(java.lang.String id)Returns a VisAD data object corresponding to a Vis5D topography file.DataImplopen(java.net.URL url)Returns a VisAD data object corresponding to a URL pointing to a Vis5D topography file.voidsave(java.lang.String id, Data data, boolean replace)Save a VisAD data object in this form.-
Methods inherited from class visad.data.Form
getMathType
-
-
-
-
Method Detail
-
isThisType
public boolean isThisType(java.lang.String name)
Check to see if the file name might be right for this form.- Specified by:
isThisTypein interfaceFormFileInformer- Parameters:
name- name of the file- Returns:
- true if it might be a Vis5D topography file based on the name.
-
isThisType
public boolean isThisType(byte[] block)
Check to see if the block contains the magic number- Specified by:
isThisTypein interfaceFormFileInformer- Parameters:
block- block of bytes from file- Returns:
- true if the first 4 bytes correspond to "TOPO"
-
getDefaultSuffixes
public java.lang.String[] getDefaultSuffixes()
Get default suffixes for Vis5D topography files- Specified by:
getDefaultSuffixesin interfaceFormFileInformer- Returns:
- array of suffixes (.v5d, .TOPO)
-
save
public void save(java.lang.String id, Data data, boolean replace) throws BadFormException, java.io.IOException, java.rmi.RemoteException, VisADExceptionSave a VisAD data object in this form.- Specified by:
savein classFormNode- Parameters:
id- file iddata- Data object to savereplace- true to replace the existing file- Throws:
UnimplementedException- not implemented for this formBadFormExceptionjava.io.IOExceptionjava.rmi.RemoteExceptionVisADException
-
add
public void add(java.lang.String id, Data data, boolean replace) throws BadFormExceptionAdd data to an existing data object.- Specified by:
addin classFormNode- Parameters:
id- file iddata- Data object to append toreplace- true to replace the existing file- Throws:
BadFormException- not applicable to this form
-
getForms
public FormNode getForms(Data data)
Return the data forms that are compatible with a data object.
-
open
public DataImpl open(java.net.URL url) throws BadFormException, VisADException, java.io.IOException
Returns a VisAD data object corresponding to a URL pointing to a Vis5D topography file.- Specified by:
openin classFormNode- Parameters:
url- URL pointing to the Vis5D topography- Returns:
- A VisAD data object corresponding to the Vis5D topography file.
- Throws:
BadFormException- if not a Vis5D topo file.VisADException- if a problem occurs in core VisAD. Probably a VisAD object couldn't be created.java.io.IOException- if an I/O failure occurs.
-
open
public DataImpl open(java.lang.String id) throws BadFormException, java.io.IOException, VisADException
Returns a VisAD data object corresponding to a Vis5D topography file.- Specified by:
openin classFormNode- Parameters:
id- path to the existing Vis5D file.- Returns:
- A VisAD data object corresponding to the Vis5D dataset.
- Throws:
BadFormException- if not a Vis5D topo file.VisADException- if a problem occurs in core VisAD. Probably a VisAD object couldn't be created.java.io.IOException- if an I/O failure occurs.
-
open
public DataImpl open(java.io.InputStream in) throws BadFormException, java.io.IOException, VisADException
Returns a VisAD data object corresponding to an input stream for a Vis5DTopography file.- Parameters:
in- Input stream- Returns:
- A VisAD data object corresponding to the Vis5D topo file.
- Throws:
BadFormException- if not a Vis5D topo file.VisADException- if a problem occurs in core VisAD. Probably a VisAD object couldn't be created.java.io.IOException- if an I/O failure occurs.
-
-
DMelt 3.0 © DataMelt by jWork.ORG