public void testIsGzipInputStream() throws IOException
{
InputStream is = new FileInputStream(ALIGN_FILE);
-
+
/*
* 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));
-
+
/*
* check recognition of non-gzipped input
*/
assertFalse(FileParse.isGzipStream(new BufferedInputStream(
- new ByteArrayInputStream("NOT A GZIP".getBytes()))));
+ new ByteArrayInputStream("NOT A GZIP".getBytes()))));
}
@Test(groups = { "Functional" })