JSON 헤더 및 파일 경로에서 Seo-Oriented 필드를 추출합니다

CPIO 목적

CPIO 형식은 tar과 유사합니다. CPIO Archive를 사용하면 여러 파일을 단일 파일로 결합 할 수 있습니다. 공동 파일도 압축 할 수 있습니다.

압축없이 수집

두 파일을 CPIO 아카이브에 수집하는 샘플이 있습니다.

 1try (fileoutputStream cpiofile = new FileOutputStream ( "combined.cpio")) {
 2    파일 fi1 =  파일 ( "text.txt");
 3    fi2 =  파일 ( "picture.png");
 4
 5    try (CpioArchive archive = new CpioArchive()) {
 6        archive.createEntry("text.txt", fi1);
 7        archive.createEntry("picture.png", fi2);
 8        archive.save(cpioFile);
 9    }
10} catch (ioException ex) {
11    System.out.println (예);
12}

CPIO 아카이브 압축

UNIX와 같은 운영 체제CPIO 유틸리티에서 CPIO 아카이브를 생성시 GZIP로 압축 할 수 있습니다. ASSOPE.zip은 SaveGzipped 메소드와 유사한 기능을 제공합니다.

1try (cpioarchive archive = new cpioarchive ()) {
2    Archive.createentries ( "C : \\ 폴더", False);
3    archive.savegzipped ( "result.cpio.gz");
4}

오늘날 XZ Utility는 Linux와 Unix에서 인기를 얻었습니다. CPIO 압축은 Aspose.zip에 원활하게 통합됩니다. CPIO 아카이브의 SaveXzCompressed 방법을 사용하십시오.

1try (cpioarchive archive = new cpioarchive ()) {
2    Archive.createentries ( "C : \\ 폴더", False);
3    archive.savexzcompressed ( "result.cpio.xz");
4}
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.