Пример #1
0
  /**
   * Set the content of this node to the given object. The object is then cast by the internal
   * representation to the form it needs. This assumes at least some amount of intelligence on the
   * part of the caller, but we also know that we should not pass something dumb to it when we can
   * check what sort of content types it likes to handle. We assume the loader thread is operating
   * in the same context as the one that created the node in the first place and thus knows the
   * general types of items to pass through.
   *
   * @param mimetype The mime type of this object if known
   * @param content The content of the object
   * @throws IllegalArguementException The content object is not supported
   */
  public void setContent(String mimetype, Object content) throws IllegalArgumentException {

    // REVISIT - we ignore the content object and use
    // URL[0] directly.  This is very wrong, but we haven't
    // been able to get agreement on how to update the content
    // loader yet, so this will have to do in the meantime.
    String url = vfURL[0];
    if (movieDecoder != null) {
      movieDecoder.init(url);
    } else {
      throw new IllegalArgumentException("JMF not available");
    }
  }