package org.bucksch.zeipis.store;
import java.io.*;

public class LocalfileTarget implements Target
{
  public LocalfileTarget(String absFilename, String relFilename)
    throws FileNotFoundException
  {
    myFile = new File(absFilename);
    myStream = new FileOutputStream(myFile);
    myRelFilename = relFilename;
  }
  public LocalfileTarget(File file, String relFilename)
    throws FileNotFoundException
  {
    myFile = file;
    myStream = new FileOutputStream(myFile);
    myRelFilename = relFilename;
  }
  public OutputStream outStream()
  {
    return myStream;
  }

  public String relFilename()
  {
    return myRelFilename;
  }

  public String absFilename()
  {
    return myFile.getPath();
  }

  public String toString()
  {
    return absFilename();
  }

  // Data
  protected File myFile;
  protected String myRelFilename;
  protected FileOutputStream myStream;
}
