Search in sources :

Example 1 with BundleListXpp3Reader

use of org.apache.sling.maven.projectsupport.bundlelist.v1_0_0.io.xpp3.BundleListXpp3Reader in project sling by apache.

the class DisplayBundleUpdatesMojo method readBundleList.

private BundleList readBundleList(File file) throws IOException, XmlPullParserException {
    BundleListXpp3Reader reader = new BundleListXpp3Reader();
    FileInputStream fis = new FileInputStream(file);
    try {
        return reader.read(fis);
    } finally {
        fis.close();
    }
}
Also used : BundleListXpp3Reader(org.apache.sling.maven.projectsupport.bundlelist.v1_0_0.io.xpp3.BundleListXpp3Reader) FileInputStream(java.io.FileInputStream)

Example 2 with BundleListXpp3Reader

use of org.apache.sling.maven.projectsupport.bundlelist.v1_0_0.io.xpp3.BundleListXpp3Reader in project sling by apache.

the class BundleListUtils method readBundleList.

public static BundleList readBundleList(File file) throws IOException, XmlPullParserException {
    BundleListXpp3Reader reader = new BundleListXpp3Reader();
    FileInputStream fis = new FileInputStream(file);
    try {
        return reader.read(fis);
    } finally {
        fis.close();
    }
}
Also used : BundleListXpp3Reader(org.apache.sling.maven.projectsupport.bundlelist.v1_0_0.io.xpp3.BundleListXpp3Reader) FileInputStream(java.io.FileInputStream)

Example 3 with BundleListXpp3Reader

use of org.apache.sling.maven.projectsupport.bundlelist.v1_0_0.io.xpp3.BundleListXpp3Reader in project sling by apache.

the class BundleListContentProviderTest method parseBundleList.

@BeforeClass
public static void parseBundleList() throws Exception {
    final BundleListXpp3Reader reader = new BundleListXpp3Reader();
    final InputStream is = BundleListContentProviderTest.class.getClassLoader().getResourceAsStream(TEST_BUNDLE_LIST);
    assertNotNull("Expecting " + TEST_BUNDLE_LIST + " to be found", is);
    try {
        bundleList = reader.read(is);
    } finally {
        is.close();
    }
}
Also used : BundleListXpp3Reader(org.apache.sling.maven.projectsupport.bundlelist.v1_0_0.io.xpp3.BundleListXpp3Reader) InputStream(java.io.InputStream) BeforeClass(org.junit.BeforeClass)

Aggregations

BundleListXpp3Reader (org.apache.sling.maven.projectsupport.bundlelist.v1_0_0.io.xpp3.BundleListXpp3Reader)3 FileInputStream (java.io.FileInputStream)2 InputStream (java.io.InputStream)1 BeforeClass (org.junit.BeforeClass)1