public class VisADForm extends Form implements FormFileInformer
Constructor and Description |
---|
VisADForm()
Read/write a VisAD Data object using Java serialization.
|
VisADForm(boolean allowBinary)
If allowBinary is true, read/write a VisAD
Data object in VisAD's
binary file format.
If allowBinary is false, read/write a VisAD Data object using Java serialization. |
Modifier and Type | Method and Description |
---|---|
void |
add(String id,
Data data,
boolean replace)
Add data to an existing data object.
|
String[] |
getDefaultSuffixes()
Get default suffixes for files/URLs handeled by this form.
|
FormNode |
getForms(Data data)
Return the data forms that are compatible with a data object.
|
boolean |
isThisType(byte[] block)
Check to see if the block contains the magic number for this form.
|
boolean |
isThisType(String name)
Check to see if the file name might be right for this form.
|
static void |
main(String[] args)
run 'java visad.data.visad.VisADForm in_file out_file' to
convert in_file to out_file in VisAD serialized data format
|
DataImpl |
open(String id)
Open an existing data object.
|
DataImpl |
open(URL url)
Open a data object specified as a URL.
|
DataImpl |
readData(BinaryReader rdr) |
DataImpl |
readSerial(InputStream inputStream) |
void |
save(String id,
Data data,
boolean replace)
Save a Data object.
|
void |
save(String id,
Data data,
boolean replace,
boolean bigObject)
Save a Data object.
|
getMathType
public VisADForm(boolean allowBinary)
allowBinary
- if true use VisAD's binary file format,
otherwise use Java serialization.public VisADForm()
public boolean isThisType(String name)
FormFileInformer
isThisType
in interface FormFileInformer
name
- name of the filepublic boolean isThisType(byte[] block)
FormFileInformer
isThisType
in interface FormFileInformer
block
- block of bytes from filepublic String[] getDefaultSuffixes()
FormFileInformer
getDefaultSuffixes
in interface FormFileInformer
public void add(String id, Data data, boolean replace) throws BadFormException
FormNode
add
in class FormNode
BadFormException
public FormNode getForms(Data data)
FormNode
public DataImpl open(String id) throws BadFormException, IOException, VisADException
FormNode
open
in class FormNode
BadFormException
IOException
VisADException
public DataImpl open(URL url) throws BadFormException, IOException, VisADException
FormNode
open
in class FormNode
BadFormException
IOException
VisADException
public DataImpl readData(BinaryReader rdr) throws IOException, VisADException
IOException
VisADException
public DataImpl readSerial(InputStream inputStream) throws ClassNotFoundException, IOException
ClassNotFoundException
IOException
public void save(String id, Data data, boolean replace) throws BadFormException, IOException, RemoteException, VisADException
save
in class FormNode
id
- file namedata
- Data objectreplace
- true if any existing file should be overwrittenBadFormException
IOException
RemoteException
VisADException
public void save(String id, Data data, boolean replace, boolean bigObject) throws BadFormException, IOException, RemoteException, VisADException
id
- file namedata
- Data objectreplace
- true if any existing file should be overwrittenbigObject
- true if the Data object is larger
than the computer's memory, in which case special
measures will be taken to converse memory usage.BadFormException
IOException
RemoteException
VisADException
public static void main(String[] args) throws VisADException, RemoteException, IOException
VisADException
RemoteException
IOException
Copyright © 1996–2023 The SSEC Visualization Project. All rights reserved.