LoadingInfo implements AutoCloseable { public boolean isGzipped() { return gzipped; } LoadingInfo(FileObject fileObject);  LoadingInfo(FileObject fileObject, boolean tailing);  LoadingInfo(FileObject fileObject, boolean tailing, OpenMode openMode); InputStream getContentInputStream(); boolean isTailing(); boolean isGzipped(); String getFriendlyUrl(); ObservableInputStreamImpl getObservableInputStreamImpl(); FileObject getFileObject(); void resetLastFileSize(); byte[] getInputStreamBufferedStart(); void reloadIfFileSizeChanged(); @Override void close();  }
@Test public void testAverageFile() throws IOException { try (LoadingInfo logFileContent = new LoadingInfo(asFileObject("jul_log.txt"))) { assertFalse(logFileContent.isGzipped()); assertEquals(15_300, asString(logFileContent).length()); } }
@Test public void testAverageGzippedFile() throws IOException { try (LoadingInfo logFileContent = new LoadingInfo(asFileObject("jul_log.txt.gz"))) { assertTrue(logFileContent.isGzipped()); assertEquals(15_300, asString(logFileContent).length()); } }
@Test public void testLargerFile() throws IOException { try (LoadingInfo logFileContent = new LoadingInfo(asFileObject("hierarchy/hierarchy.log"))) { assertFalse(logFileContent.isGzipped()); assertEquals(69_058, asString(logFileContent).length()); } }
@Test public void testLargerGzippedFile() throws IOException { try (LoadingInfo logFileContent = new LoadingInfo(asFileObject("hierarchy/hierarchy.log.gz"))) { assertTrue(logFileContent.isGzipped()); assertEquals(69_058, asString(logFileContent).length()); } }
@Test public void testLargerHttp() throws Exception { try (LoadingInfo logFileContent = new LoadingInfo(fsManager.resolveFile(HTTP_NOT_GZIPPED))) { assertFalse(logFileContent.isGzipped()); assertEquals(69_058, asString(logFileContent).length()); } }
@Test public void testLargerGzippedHttp() throws Exception { try (LoadingInfo logFileContent = new LoadingInfo(fsManager.resolveFile(HTTP_GZIPPED))) { assertTrue(logFileContent.isGzipped()); assertEquals(69_058, asString(logFileContent).length()); } }