Java - Read BZ2 file and uncompress/parse on the fly

前端 未结 2 1276
庸人自扰
庸人自扰 2021-01-04 03:10

I have a fairly large BZ2 file that with several text files in it. Is it possible for me to use Java to uncompress certain files inside the BZ2 file and uncompress/parse the

2条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-04 03:14

    The Ant project contains a bzip2 library. Which has a org.apache.tools.bzip2.CBZip2InputStream class. You can use this class to decompress the bzip2 file on the fly - it just extends the standard Java InputStream class.

提交回复
热议问题