Search in sources :

Example 1 with PkgWriter

use of org.haiku.pkg.output.PkgWriter in project haikudepotserver by haiku.

the class PkgDumpTool method run.

public void run() {
    new CmdLineParser(this);
    try (HpkrFileExtractor hpkrFileExtractor = new HpkrFileExtractor(hpkrFile);
        OutputStreamWriter streamWriter = new OutputStreamWriter(System.out);
        PkgWriter pkgWriter = new PkgWriter(streamWriter)) {
        pkgWriter.write(new PkgIterator(hpkrFileExtractor.getPackageAttributesIterator()));
        pkgWriter.flush();
    } catch (Throwable th) {
        LOGGER.error("unable to dump packages", th);
    }
}
Also used : PkgWriter(org.haiku.pkg.output.PkgWriter) PkgIterator(org.haiku.pkg.PkgIterator) CmdLineParser(org.kohsuke.args4j.CmdLineParser) OutputStreamWriter(java.io.OutputStreamWriter) HpkrFileExtractor(org.haiku.pkg.HpkrFileExtractor)

Aggregations

OutputStreamWriter (java.io.OutputStreamWriter)1 HpkrFileExtractor (org.haiku.pkg.HpkrFileExtractor)1 PkgIterator (org.haiku.pkg.PkgIterator)1 PkgWriter (org.haiku.pkg.output.PkgWriter)1 CmdLineParser (org.kohsuke.args4j.CmdLineParser)1