Package net.sf.fmj.test.compat.misc

Source Code of net.sf.fmj.test.compat.misc.InputSourceStreamTest

package net.sf.fmj.test.compat.misc;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;

import javax.media.protocol.ContentDescriptor;
import javax.media.protocol.InputSourceStream;

import junit.framework.TestCase;

/**
*
* @author Ken Larson
*
*/
public class InputSourceStreamTest extends TestCase
{

  public void testInputSourceStream() throws IOException
  {
    String test = new File("samplemedia/safexmas.mov").getAbsolutePath();

    InputSourceStream s = new InputSourceStream(new FileInputStream(test), new ContentDescriptor("video.quicktime"));
    assertEquals(s.getContentLength(), -1);
    assertEquals(s.endOfStream(), false);
    assertEquals(s.getControls().length, 0);
    assertEquals(s.getContentDescriptor().getContentType(), "video.quicktime");
    assertEquals(s.willReadBlock(), false);
    s.close();
   
   
  }
}
TOP

Related Classes of net.sf.fmj.test.compat.misc.InputSourceStreamTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.