public final class DafHandleManager extends Object
Modifier and Type | Method and Description |
---|---|
static void |
closeFile(int handle,
String arch)
Close the file associated with HANDLE.
Based on the ZZDDHCLS routine from the SPICE library. |
static String |
getArchitectureFromHandle(int handle)
Indicate the architecture of the file associated to handle.
Inspired by ZZDDHNFO routine in the SPICE library. |
static String |
getBinaryFileFormatFromHandle(int handle)
Indicate the binary file format of the file associated to handle.
Inspired by ZZDDHNFO routine in the SPICE library. |
static File |
getFile(int handle)
Return the File object associated with a handle.
Inspired by ZZDDHHLU routine from the SPICE library. |
static String |
getFilename(int handle)
Indicate the file name associated to a handle.
Inspired by ZZDDHNFO routine in the SPICE library. |
static boolean |
getFound(int handle)
Indicate if the handle is found in the list.
Inspired by ZZDDHNFO routine in the SPICE library. |
static int |
getHandle(String fname)
Retrieve handle associated with filename.
|
static int |
openFile(String fname,
String accessMethod,
String archi)
Load a new direct access file.
This method is based on the ZZDDHOPN routine in the SPICE library |
public static int openFile(String fname, String accessMethod, String archi) throws IOException, PatriusException
fname
- Name of file to be loadedaccessMethod
- Access method used to load the filearchi
- Expected architecture of the file to loadIOException
- if there is a problem with the filePatriusException
- if there is a problem with the SPICE algorithm (including access method)public static void closeFile(int handle, String arch) throws PatriusException
handle
- File handle associated with the file to closearch
- Expected architecture of the handle to closePatriusException
- if the architecture does not correspond to the one savedpublic static String getFilename(int handle)
handle
- File handle assigned to file of interestpublic static boolean getFound(int handle)
handle
- File handle assigned to file of interestpublic static String getBinaryFileFormatFromHandle(int handle)
handle
- File handle assigned to file of interestpublic static String getArchitectureFromHandle(int handle)
handle
- File handle assigned to file of interestpublic static int getHandle(String fname) throws PatriusException
fname
- Name of a file previously loadedPatriusException
- if the file is not found in the listpublic static File getFile(int handle)
handle
- Handle associated with the file of interestCopyright © 2023 CNES. All rights reserved.