Package org.jmol.util

Examples of org.jmol.util.OutputStringBuffer


    String filename = getFullPathName();
    if (filename.equals("string") || filename.indexOf("[]") >= 0
        || filename.equals("JSNode")) {
      String str = getCurrentFileAsString();
      BufferedOutputStream bos = new BufferedOutputStream(os);
      OutputStringBuffer sb = new OutputStringBuffer(bos);
      sb.append(str);
      return sb.toString();
    }
    String pathName = modelManager.getModelSetPathName();
    return (pathName == null ? "" : (String) getFileAsBytes(pathName, os));
  }
View Full Code Here


    String msg = null;
    String[] fullPath = new String[1];
    OutputStream os = getOutputStream(fileName, fullPath);
    if (os == null)
      return "";
    OutputStringBuffer sb;
    if (type.equals("PDB")) {
      sb = new OutputStringBuffer(new BufferedOutputStream(os));
      msg = getPdbData(null, sb);
    } else if (type.equals("FILE")) {
      msg = writeCurrentFile(os);
      // quality = Integer.MIN_VALUE;
    } else if (type.equals("PLOT")) {
      sb = new OutputStringBuffer(new BufferedOutputStream(os));
      msg = modelSet.getPdbData(modelIndex, type2, getSelectionSet(false), parameters, sb);
    }
    if (msg != null)
      msg = "OK " + msg + " " + fullPath[0];
    try {
View Full Code Here

  public String getPdbAtomData(BitSet bs, OutputStringBuffer sb) {
    if (atomCount == 0)
      return "";
    if (sb == null)
      sb = new OutputStringBuffer(null);
    int iModel = atoms[0].modelIndex;
    int iModelLast = -1;
    boolean showModels = (iModel != atoms[atomCount - 1].modelIndex);
    LabelToken[] t4x = null;
    LabelToken[] t3x = null;
View Full Code Here

      modelIndex = getJmolDataSourceFrame(modelIndex);
    if (modelIndex < 0)
      return "";
    Model model = models[modelIndex];
    if (sb == null)
      sb = new OutputStringBuffer(null);
    StringBuffer pdbCONECT = new StringBuffer();
    boolean isDraw = (type.indexOf("draw") >= 0);
    BitSet bsAtoms = null;
    BitSet bsWritten = new BitSet();
    boolean isPDB = models[modelIndex].isPDB;
View Full Code Here

TOP

Related Classes of org.jmol.util.OutputStringBuffer

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.