Package org.jmol.io
Class JmolUtil
java.lang.Object
org.jmol.io.JmolUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
clearAndCachePngjFile
(FileManager fm, String[] data) getAtomSetCollectionOrBufferedReaderFromZip
(Viewer vwr, InputStream is, String fileName, String[] zipDirectory, Map<String, Object> htParams, int subFilePtr, boolean asBufferedReader) A rather complicated means of reading a ZIP file, which could be a single file, or it could be a manifest-organized file, or it could be a Spartan directory.byte[]
getCachedPngjBytes
(FileManager fm, String pathName) private String[]
getSpartanSubfiles
(String[] zipDirectory) Called to see if we have a zipped up Mac directory.private boolean
isSpartanZip
(String[] zipDirectory) check for a Spartan directory.private String
shortSceneFilename
(String pathName)
-
Constructor Details
-
JmolUtil
public JmolUtil()
-
-
Method Details
-
getImage
-
getAtomSetCollectionOrBufferedReaderFromZip
public Object getAtomSetCollectionOrBufferedReaderFromZip(Viewer vwr, InputStream is, String fileName, String[] zipDirectory, Map<String, Object> htParams, int subFilePtr, boolean asBufferedReader) A rather complicated means of reading a ZIP file, which could be a single file, or it could be a manifest-organized file, or it could be a Spartan directory.- Parameters:
vwr
-is
-fileName
-zipDirectory
-htParams
-subFilePtr
-asBufferedReader
-- Returns:
- a single atomSetCollection
-
getCachedPngjBytes
-
clearAndCachePngjFile
-
shortSceneFilename
-
getSpartanSubfiles
Called to see if we have a zipped up Mac directory. Assignment can be made if (1) there is only one file in the collection and (2) that file is "xxxx.spardir/" Note that __MACOS files are ignored by the ZIP file reader.- Parameters:
zipDirectory
-- Returns:
- subFileList
-
isSpartanZip
check for a Spartan directory. This is not entirely satisfying, because we aren't reading the file in the proper sequence. this code is a hack that should be replaced with the sort of code running in FileManager now. 0 entry is not used here, as it is the root directory- Parameters:
zipDirectory
-- Returns:
- true if a zipped-up Spartan directory
-