/**
 * A RemoteSource merely represents a data supplier which is on a different host.
 * Given that RemoteSource is a local object, it is retrieving data over the network.
 * 
 * E.g. you have a TV card on a remote host and a player on the local host,
 * then the local player (which is a Target here) would be a connected
 * to a RemoteSource.
 * 
 * RemoteTarget is implemented as HTTP client.
 */

package org.bucksch.zeipis.store;
import org.bucksch.zeipis.all.Util;
import java.io.*;
import java.net.URL;

public class RemoteSource implements Source
{
  public RemoteSource(URL source)
  {
    mySource = source;
  }
  // TODO what happens when the remote end sets an error?
  public InputStream inStream()
    throws IOException
  {
    Util.debug("instream requested from RemoteSource for " + mySource);
    //throw new IOException("Who are you?");
    return mySource.openStream();
  }

  // Data
  protected URL mySource;
}
