Package org.jmol.io

Class JmolUtil

java.lang.Object
org.jmol.io.JmolUtil

public class JmolUtil extends Object
  • Constructor Details

    • JmolUtil

      public JmolUtil()
  • Method Details

    • getImage

      public Object getImage(Viewer vwr, Object fullPathNameOrBytes, String echoName, boolean forceSync)
    • 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

      public byte[] getCachedPngjBytes(FileManager fm, String pathName)
    • clearAndCachePngjFile

      private boolean clearAndCachePngjFile(FileManager fm, String[] data)
    • shortSceneFilename

      private String shortSceneFilename(String pathName)
    • getSpartanSubfiles

      private String[] getSpartanSubfiles(String[] zipDirectory)
      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

      private boolean isSpartanZip(String[] zipDirectory)
      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