Exemplo n.º 1
0
  public void putf(NslData data) {
    try {
      StringBuffer strbuf = new StringBuffer();

      strbuf.append(data.nslGetParent().nslGetRealName()); //  Object name
      strbuf.append("." + data.nslGetName() + " ");
      strbuf.append(data.getDataType() + " "); //  Class name
      strbuf.append(data.getDimensions() + " "); //  Dimension

      strbuf.append("{ "); //  Sizes
      int dim[] = data.getSizes();
      for (int i = 0; i < data.getDimensions(); i++) {
        strbuf.append(dim[i] + " ");
      }
      strbuf.append("} ");

      strbuf.append("{ "); //  Data
      strbuf.append(data.toString());
      strbuf.append("} ");

      pwr.println(strbuf.toString());

      if (pwr.checkError()) {
        System.err.println("NslFile: An error happened while writing in file: " + name);
      }
    } catch (Exception e) {
      System.err.println("NslFile: Can't write line in file " + name);
    }
  }
Exemplo n.º 2
0
 public void puts(NslData data) {
   try {
     pwr.println(data.toString());
     if (pwr.checkError()) {
       System.err.println("NslFile: An error happened while writing in file: " + name);
     }
   } catch (Exception e) {
     System.err.println("NslFile: Can't write line in file " + name);
   }
 }
Exemplo n.º 3
0
 public void puts(boolean value) {
   try {
     pwr.println(value);
     if (pwr.checkError()) {
       System.err.println("NslFile: An error happened while writing in file: " + name);
     }
   } catch (Exception e) {
     System.err.println("NslFile: Can't write line in file " + name);
   }
 }
Exemplo n.º 4
0
 public void puts(Object obj) {
   try {
     Object temp = transform(obj);
     pwr.println(temp.toString());
     if (pwr.checkError()) {
       System.err.println("NslFile: An error happened while writing in file: " + name);
     }
   } catch (Exception e) {
     System.err.println("NslFile: Can't write line in file " + name);
   }
 }