Package org.jfx4ee.adm4ee.business.appcast.entity

Examples of org.jfx4ee.adm4ee.business.appcast.entity.Enclosure


        updater = new Updater(null);
        AppcastManager appcastManagerMock = mock(AppcastManager.class);
        Appcast appcast = new Appcast();
        Channel c = new Channel();
        Item i = new Item();
        Enclosure e = new Enclosure();
        e.setVersion("2.0.4711");
        i.setEnclosure(e);
        List<Item> items = new ArrayList<>();
        items.add(i);
        c.setItems(items);
        appcast.setChannel(c);
View Full Code Here


        assertNotNull(item);
        assertNotNull(item.getTitle());
        assertNotNull(item.getReleaseNotesLink());
        assertTrue(item.getReleaseNotesLink().contains("notes.html"));

        Enclosure enclosure = item.getEnclosure();
        assertNotNull(enclosure);
        assertEquals("2.0.4711", enclosure.getVersion());
        assertTrue(enclosure.getLength() > 0);
        assertNotNull(enclosure.getUrl());
    }
View Full Code Here

     * @return
     * @throws IOException
     */
    public Path download(Appcast appcast, Path targetDir) throws IOException, Exception {
        Path downloaded = null;
        Enclosure enclosure = appcast.getLatestEnclosure();
        if (enclosure != null) {
            String url = enclosure.getUrl();
            if (url != null && !url.isEmpty()) {
                URL enclosureUrl = new URL(url);
                String targetName = FilenameUtils.getName(enclosureUrl.toString());
                long length = enclosure.getLength();

                File tmpFile = null;
                ReadableByteChannel rbc = null;
                FileOutputStream fos = null;
                try {
View Full Code Here

TOP

Related Classes of org.jfx4ee.adm4ee.business.appcast.entity.Enclosure

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.