@Test void XarFile() throws XarException, IOException { try (XarFile file = new XarFile(extensionPackager.getExtensionFile(new ExtensionId("xar1", "1.0")))) { assertEquals(6, file.getEntries().size()); XarPackageTest.assertEqualsEntry(new XarEntry(A_EN, "a/en.xml", XarModel.ACTION_MERGE, "type1"), file.getEntry(A_EN)); XarPackageTest.assertEqualsEntry(new XarEntry(A_PAGE, "a/page.xml", XarModel.ACTION_SKIP, "type0"), file.getEntry(A_PAGE)); XarPackageTest.assertEqualsEntry(new XarEntry(X_EN, "x/en.xml", XarModel.ACTION_MERGE, "type1"), file.getEntry(X_EN)); XarPackageTest.assertEqualsEntry(new XarEntry(X_PAGE, "x/page.xml", XarModel.ACTION_SKIP, "type0"), file.getEntry(X_PAGE)); XarPackageTest.assertEqualsEntry(new XarEntry(Z_EN, "z/en.xml", XarModel.ACTION_SKIP), file.getEntry(Z_EN)); XarPackageTest.assertEqualsEntry(new XarEntry(Z_PAGE, "z/page.xml", XarModel.ACTION_SKIP), file.getEntry(Z_PAGE)); Iterator<XarEntry> packageFilesIterator = file.getXarPackage().getPackageFiles().iterator(); XarPackageTest.assertEqualsEntry(new XarEntry(A_EN, "a/en.xml", XarModel.ACTION_MERGE, "type1"), packageFilesIterator.next()); XarPackageTest.assertEqualsEntry(new XarEntry(A_PAGE, "a/page.xml", XarModel.ACTION_SKIP, "type0"), packageFilesIterator.next()); XarPackageTest.assertEqualsEntry(new XarEntry(X_PAGE, "x/page.xml", XarModel.ACTION_SKIP, "type0"), packageFilesIterator.next()); XarPackageTest.assertEqualsEntry(new XarEntry(X_EN, "x/en.xml", XarModel.ACTION_MERGE, "type1"), packageFilesIterator.next()); XarPackageTest.assertEqualsEntry(new XarEntry(Z_EN, "z/en.xml", XarModel.ACTION_SKIP), packageFilesIterator.next()); XarPackageTest.assertEqualsEntry(new XarEntry(Z_PAGE, "z/page.xml", XarModel.ACTION_SKIP), packageFilesIterator.next()); } }
public XarFile(File file) throws XarException, IOException { this(file, (XarPackage) null); }
XarFile implements Closeable { public XarFile(File file) throws XarException, IOException { this(file, (XarPackage) null); } }
XarFile implements Closeable { public XarFile(File file) throws XarException, IOException { this(file, (XarPackage) null); } XarFile(File file);  XarFile(File file, Collection<XarEntry> pages);  XarFile(File file, XarPackage xarPackage); }
XarFile implements Closeable { public XarFile(File file) throws XarException, IOException { this(file, (XarPackage) null); } XarFile(File file);  XarFile(File file, Collection<XarEntry> pages);  XarFile(File file, XarPackage xarPackage); File getFile(); @Override void close(); InputStream getInputStream(LocalDocumentReference reference); Collection<XarEntry> getEntries(); XarEntry getEntry(LocalDocumentReference reference); @Override String toString(); XarPackage getXarPackage(); }
XarFile implements Closeable { public XarFile(File file) throws XarException, IOException { this(file, (XarPackage) null); } XarFile(File file);  XarFile(File file, Collection<XarEntry> pages);  XarFile(File file, XarPackage xarPackage); File getFile(); @Override void close(); InputStream getInputStream(LocalDocumentReference reference); Collection<XarEntry> getEntries(); XarEntry getEntry(LocalDocumentReference reference); @Override String toString(); XarPackage getXarPackage();  }