FileDocCategorySizeDatePackage
ParseTrash.javaAPI DocExample3388Mon Apr 06 18:10:24 BST 1998c16.trash

ParseTrash

public class ParseTrash extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidfillBin(java.lang.String filename, Fillable bin)

    try {
      BufferedReader data =
        new BufferedReader(
          new FileReader(filename));
      String buf;
      while((buf = data.readLine())!= null) {
        String type = buf.substring(0, 
          buf.indexOf(':")).trim();
        double weight = Double.valueOf(
          buf.substring(buf.indexOf(':") + 1)
          .trim()).doubleValue();
        bin.addTrash(
          Trash.factory(
            new Trash.Info(type, weight)));
      }
      data.close();
    } catch(IOException e) {
      e.printStackTrace();
    } catch(Exception e) {
      e.printStackTrace();
    }
  
public static voidfillBin(java.lang.String filename, java.util.Vector bin)

    fillBin(filename, new FillableVector(bin));