/** * If this file refers to an archive file, its archive driver is asked to * return an icon to be displayed for this file. * Otherwise, null is returned. * * @return An icon or {@code null}. * @deprecated GUI features will be removed from this class in TrueZIP 8. */ @Deprecated public @CheckForNull Icon getClosedIcon() { return isArchive() ? ((FsArchiveDriver<?>) getDriver(getScheme())) .getClosedIcon(getController().getModel()) : null; }
private InputSocket<?> getArchiveInputSocket() { return getArchiveDriver().getInputSocket(parent, name, FsInputOptions.NONE); }
/** * If this file refers to an archive file, its archive driver is asked to * return an icon to be displayed for this file. * Otherwise, null is returned. * * @return An icon or {@code null}. * @deprecated GUI features will be removed from this class in TrueZIP 8. */ @Deprecated public @CheckForNull Icon getOpenIcon() { return isArchive() ? ((FsArchiveDriver<?>) getDriver(getScheme())) .getOpenIcon(getController().getModel()) : null; }
@Test(expected = NullPointerException.class) public void testNewInputShopMustNotTolerateNullInputSocket() throws IOException { getArchiveDriver().newInputShop(model, null); }
@Test(expected = NullPointerException.class) public void testNewOutputShopMustNotTolerateNullInputSocket() throws IOException { getArchiveDriver().newOutputShop(model, null, null); }
@Test public void testIOPoolShouldBeConstant() { final IOPool<?> p1 = getArchiveDriver().getPool(); final IOPool<?> p2 = getArchiveDriver().getPool(); if (p1 != p2) logger.log(Level.WARNING, "{0} returns different I/O buffer pools upon multiple invocations of getPool()!", getArchiveDriver().getClass()); }
private OutputSocket<?> getArchiveOutputSocket() { return getArchiveDriver().getOutputSocket(parent, name, FsOutputOptions.NONE, null); }
@Test public void testArchiveDriverMustBeFederated() { assertTrue(getArchiveDriver().isFederated()); }
private E newEntry(final String name) throws CharConversionException { final E e = getArchiveDriver().newEntry(name, Entry.Type.FILE, null); assertNotNull(e); assertEquals(name, e.getName()); assertSame(FILE, e.getType()); assertTrue(UNKNOWN == e.getSize(DATA)); assertTrue(UNKNOWN == e.getSize(STORAGE)); assertTrue(UNKNOWN == e.getTime(WRITE)); assertTrue(UNKNOWN == e.getTime(READ)); assertTrue(UNKNOWN == e.getTime(CREATE)); return e; }
@Test(expected = NullPointerException.class) public void testNewInputShopMustNotTolerateNullModel() throws IOException { getArchiveDriver().newInputShop(null, getArchiveInputSocket()); }
@Test(expected = NullPointerException.class) public void testNewOutputShopMustNotTolerateNullModel() throws IOException { getArchiveDriver().newOutputShop(null, getArchiveOutputSocket(), null); }
@Test public void testIOPoolMustNotBeNull() { assertNotNull(getArchiveDriver().getPool()); }
private void input() throws IOException { final InputShop<E> is = getArchiveDriver() .newInputShop(model, getArchiveInputSocket()); try { check(is);
private void output() throws IOException { final OutputShop<E> os = getArchiveDriver() .newOutputShop(model, getArchiveOutputSocket(), null); try { final Closeable[] streams = new Closeable[getNumEntries()];