Package org.jmol.util

Examples of org.jmol.util.BinaryDocument


        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();
        bd.setStream(bis, false);
        sb = new StringBuffer();
        //note -- these headers must match those in ZipUtil.getAllData and CompoundDocument.getAllData
        if (header != null)
          sb.append("BEGIN Directory Entry " + name0 + "\n");
        try {
          while (true)
            sb.append(Integer.toHexString(((int) bd.readByte()) & 0xFF))
                .append(' ');
        } catch (Exception e1) {
          sb.append('\n');
        }
        if (header != null)
View Full Code Here


   */

 
  Dsn6BinaryReader(SurfaceGenerator sg, String fileName, String data) {
    super(sg, null);
    binarydoc = new BinaryDocument();
    if (data == null)
      binarydoc.setStream(sg.getAtomDataServer().getBufferedInputStream(fileName), true);
    else
      binarydoc.setStream(new DataInputStream(new ByteArrayInputStream(data.getBytes())));
    // data are HIGH on the inside and LOW on the outside
View Full Code Here

   */

 
  MrcBinaryReader(SurfaceGenerator sg, String fileName, String data) {
    super(sg, null);
    binarydoc = new BinaryDocument();
    if (data == null)
      binarydoc.setStream(sg.getAtomDataServer().getBufferedInputStream(fileName), true);
    else
      binarydoc.setStream(new DataInputStream(new ByteArrayInputStream(data.getBytes())));
    // data are HIGH on the inside and LOW on the outside
View Full Code Here

      br.mark(4);
      char[] buf = new char[5];
      br.read(buf);
      if ((new String(buf)).startsWith(PMESH_BINARY_MAGIC_NUMBER)) {
        br.close();
        binarydoc = new BinaryDocument();
        binarydoc.setStream(sg.getAtomDataServer().getBufferedInputStream(
            fileName), (buf[4] == '\0'));
        return true;
      }
      br.reset();
View Full Code Here

TOP

Related Classes of org.jmol.util.BinaryDocument

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.