Search in sources :

Example 1 with AttributeWriter

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

the class AttributeDumpTool method runHpkr.

private void runHpkr() throws IOException {
    try (HpkrFileExtractor hpkrFileExtractor = new HpkrFileExtractor(hpkFile);
        OutputStreamWriter streamWriter = new OutputStreamWriter(System.out);
        AttributeWriter attributeWriter = new AttributeWriter(streamWriter)) {
        attributeWriter.write(hpkrFileExtractor.getPackageAttributesIterator());
        attributeWriter.flush();
    }
}
Also used : AttributeWriter(org.haiku.pkg.output.AttributeWriter) HpkrFileExtractor(org.haiku.pkg.HpkrFileExtractor)

Example 2 with AttributeWriter

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

the class AttributeDumpTool method runHpkg.

private void runHpkg() throws IOException {
    try (HpkgFileExtractor hpkgFileExtractor = new HpkgFileExtractor(hpkFile);
        OutputStreamWriter streamWriter = new OutputStreamWriter(System.out);
        AttributeWriter attributeWriter = new AttributeWriter(streamWriter)) {
        writeHeader(streamWriter, "package attributes");
        attributeWriter.write(hpkgFileExtractor.getPackageAttributesIterator());
        writeHeader(streamWriter, "toc");
        attributeWriter.write(hpkgFileExtractor.getTocIterator());
        attributeWriter.flush();
    }
}
Also used : AttributeWriter(org.haiku.pkg.output.AttributeWriter) HpkgFileExtractor(org.haiku.pkg.HpkgFileExtractor)

Aggregations

AttributeWriter (org.haiku.pkg.output.AttributeWriter)2 HpkgFileExtractor (org.haiku.pkg.HpkgFileExtractor)1 HpkrFileExtractor (org.haiku.pkg.HpkrFileExtractor)1