[ 
https://issues.apache.org/jira/browse/FELIX-410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bart Elen closed FELIX-410.
---------------------------


Fixed

> Add support for zipped repository files
> ---------------------------------------
>
>                 Key: FELIX-410
>                 URL: https://issues.apache.org/jira/browse/FELIX-410
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: 1.0.0
>            Reporter: Bart Elen
>            Assignee: Richard S. Hall
>             Fix For: 1.0.0
>
>
> The repository XML-file can become relative large when the number of bundles 
> grows. 
> The bindex tool reduces the size of the repository file significantly when 
> it's zip function is used (with -r repository.zip)
> usage example:
> java -jar bindex.jar bundleDir -r repository.zip
> The problem is that OBR does not seem to support zipped repository files.
> A solution that does the trick is:
> Replace in RepositoryImpl.java line 146 "is = conn.getInputStream();" of 
> function  "private void parseRepositoryFile(int hopCount)"
> with:
>                       if ( m_url.getPath().endsWith(".zip")) {
>                               ZipInputStream zin = new ZipInputStream( 
> conn.getInputStream() );
>                               ZipEntry entry = zin.getNextEntry();
>                               while ( entry != null ) {
>                                       if ( 
> entry.getName().equals("repository.xml")) {
>                                               is = zin;
>                                               break;
>                                       }
>                                       entry = zin.getNextEntry();
>                               }
>                       } else {
>                               is = conn.getInputStream();
>                       }
>             
> And add following imports:
> import java.util.zip.ZipEntry;
> import java.util.zip.ZipInputStream;

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to