Package org.jmol.util

Examples of org.jmol.util.CompoundDocument


    if (t instanceof String)
      return t;
    try {
      BufferedInputStream bis = new BufferedInputStream((InputStream) t, 8192);
      if (CompoundDocument.isCompoundDocument(bis)) {
        CompoundDocument doc = new CompoundDocument(bis);
        return getBufferedReaderForString(doc.getAllData("Molecule", "Input").toString());
      } else if (ZipUtil.isGzip(bis)) {
        do {
          bis = new BufferedInputStream(new GZIPInputStream(bis));
        } while (ZipUtil.isGzip(bis));
      } else if (ZipUtil.isZipFile(bis)) {
View Full Code Here


        fileData.put(name0, (String) t + "\n");
        return name0;
      }
      bis = new BufferedInputStream((InputStream) t, 8192);
      if (CompoundDocument.isCompoundDocument(bis)) {
        CompoundDocument doc = new CompoundDocument(bis);
        doc.getAllData(name.replace('\\', '/'), "Molecule", fileData);
      } else if (ZipUtil.isZipFile(bis)) {
        ZipUtil.getAllData(bis, subFileList, name.replace('\\', '/'), "Molecule", fileData);
      } else if (asBinaryString) {
        // used for Spartan binary file reading
        BinaryDocument bd = new BinaryDocument();
View Full Code Here

              continue;
            zis.close();
            return "unknown zip reader error";
          }
        } else {
          String sData = (CompoundDocument.isCompoundDocument(bytes) ? (new CompoundDocument(
              new BufferedInputStream(new ByteArrayInputStream(bytes))))
              .getAllData("Molecule", "Input").toString()
              : ZipUtil.isGzip(bytes) ? ZipUtil.getGzippedBytesAsString(bytes)
                  : new String(bytes));
          BufferedReader reader = new BufferedReader(new StringReader(sData));
View Full Code Here

TOP

Related Classes of org.jmol.util.CompoundDocument

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.