import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import org.testng.AssertJUnit;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import org.testng.AssertJUnit;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
public void testIsGzipInputStream() throws IOException
{
InputStream is = new FileInputStream(ALIGN_FILE);
public void testIsGzipInputStream() throws IOException
{
InputStream is = new FileInputStream(ALIGN_FILE);
/*
* first try fails - FileInputStream does not support mark/reset
*/
assertFalse(FileParse.isGzipStream(is));
/*
* first try fails - FileInputStream does not support mark/reset
*/
assertFalse(FileParse.isGzipStream(is));
/*
* wrap in a BufferedInputStream and try again
*/
is = new BufferedInputStream(is, 16);
assertTrue(FileParse.isGzipStream(is));
/*
* wrap in a BufferedInputStream and try again
*/
is = new BufferedInputStream(is, 16);
assertTrue(FileParse.isGzipStream(is));