# Deprecated API

## Contents

- Classes
- Fields
- Methods
- Constructors

- Deprecated Classes
  Class
  Description
  org.apache.commons.compress.utils.ServiceLoaderIterator
  No longer needed.

- Deprecated Fields
  Field
  Description
  org.apache.commons.compress.archivers.tar.TarArchiveEntry.MILLIS_PER_SECOND
  Unused.
  org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream.EFS_FLAG
  use `GeneralPurposeBit.UFT8_NAMES_FLAG` instead
  org.apache.commons.compress.utils.Charsets.ISO_8859_1
  replaced by `StandardCharsets` in Java 7
  org.apache.commons.compress.utils.Charsets.US_ASCII
  replaced by `StandardCharsets` in Java 7
  org.apache.commons.compress.utils.Charsets.UTF_16
  replaced by `StandardCharsets` in Java 7
  org.apache.commons.compress.utils.Charsets.UTF_16BE
  replaced by `StandardCharsets` in Java 7
  org.apache.commons.compress.utils.Charsets.UTF_16LE
  replaced by `StandardCharsets` in Java 7
  org.apache.commons.compress.utils.Charsets.UTF_8
  replaced by `StandardCharsets` in Java 7

- Deprecated Methods
  Method
  Description
  org.apache.commons.compress.archivers.ar.ArArchiveInputStream.getNextArEntry()
  Use `ArArchiveInputStream.getNextEntry()`.
  org.apache.commons.compress.archivers.ArchiveInputStream.getCount()
  this method may yield wrong results for large archives, use #getBytesRead instead
  org.apache.commons.compress.archivers.ArchiveOutputStream.getCount()
  this method may yield wrong results for large archives, use #getBytesWritten instead
  org.apache.commons.compress.archivers.ArchiveStreamFactory.setEntryEncoding(String)
  1.10 use `ArchiveStreamFactory(String)` to specify the encoding
  org.apache.commons.compress.archivers.cpio.CpioArchiveEntry.getHeaderPadCount()
  This method doesn't properly work for multi-byte encodings. And creates corrupt archives. Use `CpioArchiveEntry.getHeaderPadCount(Charset)` or `CpioArchiveEntry.getHeaderPadCount(long)` in any case.
  org.apache.commons.compress.archivers.cpio.CpioArchiveInputStream.getNextCPIOEntry()
  Use `CpioArchiveInputStream.getNextEntry()`.
  org.apache.commons.compress.archivers.dump.DumpArchiveInputStream.getCount()
  org.apache.commons.compress.archivers.dump.DumpArchiveInputStream.getNextDumpEntry()
  Use `DumpArchiveInputStream.getNextEntry()`.
  org.apache.commons.compress.archivers.examples.Archiver.create(String, OutputStream, File)
  this method leaks resources
  org.apache.commons.compress.archivers.examples.Archiver.create(String, SeekableByteChannel, File)
  this method leaks resources
  org.apache.commons.compress.archivers.examples.Expander.expand(InputStream, File)
  this method leaks resources
  org.apache.commons.compress.archivers.examples.Expander.expand(String, InputStream, File)
  this method leaks resources
  org.apache.commons.compress.archivers.examples.Expander.expand(String, SeekableByteChannel, File)
  this method leaks resources
  org.apache.commons.compress.archivers.jar.JarArchiveEntry.getCertificates()
  since 1.5, not currently implemented
  org.apache.commons.compress.archivers.jar.JarArchiveEntry.getManifestAttributes()
  since 1.5, do not use; always returns null
  org.apache.commons.compress.archivers.jar.JarArchiveInputStream.getNextJarEntry()
  Use `JarArchiveInputStream.getNextEntry()`.
  org.apache.commons.compress.archivers.sevenz.SevenZArchiveEntry.getCrc()
  use getCrcValue instead.
  org.apache.commons.compress.archivers.sevenz.SevenZArchiveEntry.javaTimeToNtfsTime(Date)
  Use `TimeUtils.toNtfsTime(Date)` instead.
  org.apache.commons.compress.archivers.sevenz.SevenZArchiveEntry.ntfsTimeToJavaTime(long)
  Use `TimeUtils.ntfsTimeToDate(long)` instead.
  org.apache.commons.compress.archivers.sevenz.SevenZArchiveEntry.setCrc(int)
  use setCrcValue instead.
  org.apache.commons.compress.archivers.sevenz.SevenZOutputFile.putArchiveEntry(ArchiveEntry)
  Use `SevenZOutputFile.putArchiveEntry(SevenZArchiveEntry)`.
  org.apache.commons.compress.archivers.tar.TarArchiveEntry.getGroupId()
  use #getLongGroupId instead as group ids can be bigger than `Integer.MAX_VALUE`
  org.apache.commons.compress.archivers.tar.TarArchiveEntry.getUserId()
  use #getLongUserId instead as user ids can be bigger than `Integer.MAX_VALUE`
  org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry()
  Use `TarArchiveInputStream.getNextEntry()`.
  org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.getCount()
  org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.getRecordSize()
  org.apache.commons.compress.archivers.tar.TarUtils.parsePAX01SparseHeaders(String)
  use #parseFromPAX01SparseHeaders instead
  org.apache.commons.compress.archivers.tar.TarUtils.parsePaxHeaders(InputStream, List<TarArchiveStructSparse>, Map<String, String>)
  use the four-arg version instead
  org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.getNextZipEntry()
  Use `ZipArchiveInputStream.getNextEntry()`.
  org.apache.commons.compress.compressors.bzip2.BZip2Utils.getCompressedFilename(String)
  Use `BZip2Utils.getCompressedFileName(String)`.
  org.apache.commons.compress.compressors.bzip2.BZip2Utils.getUncompressedFilename(String)
  Use `BZip2Utils.getUncompressedFileName(String)`.
  org.apache.commons.compress.compressors.bzip2.BZip2Utils.isCompressedFilename(String)
  Use `BZip2Utils.isCompressedFileName(String)`.
  org.apache.commons.compress.compressors.CompressorInputStream.getCount()
  this method may yield wrong results for large archives, use #getBytesRead instead
  org.apache.commons.compress.compressors.CompressorStreamFactory.setDecompressConcatenated(boolean)
  1.10 use the `CompressorStreamFactory(boolean)` constructor instead
  org.apache.commons.compress.compressors.FileNameUtil.getCompressedFilename(String)
  Use `FileNameUtil.getCompressedFileName(String)`.
  org.apache.commons.compress.compressors.FileNameUtil.getUncompressedFilename(String)
  Use `FileNameUtil.getUncompressedFileName(String)`.
  org.apache.commons.compress.compressors.FileNameUtil.isCompressedFilename(String)
  Use `FileNameUtil.isCompressedFileName(String)`.
  org.apache.commons.compress.compressors.gzip.GzipParameters.getFilename()
  Use `GzipParameters.getFileName()`.
  org.apache.commons.compress.compressors.gzip.GzipParameters.setFilename(String)
  Use `GzipParameters.setFileName(String)`.
  org.apache.commons.compress.compressors.gzip.GzipUtils.getCompressedFilename(String)
  Use `GzipUtils.getCompressedFileName(String)`.
  org.apache.commons.compress.compressors.gzip.GzipUtils.getUncompressedFilename(String)
  Use `GzipUtils.getUncompressedFileName(String)`.
  org.apache.commons.compress.compressors.gzip.GzipUtils.isCompressedFilename(String)
  Use `GzipUtils.isCompressedFileName(String)`.
  org.apache.commons.compress.compressors.lzma.LZMAUtils.getCompressedFilename(String)
  Use `LZMAUtils.getCompressedFileName(String)`.
  org.apache.commons.compress.compressors.lzma.LZMAUtils.getUncompressedFilename(String)
  Use `LZMAUtils.getUncompressedFileName(String)`.
  org.apache.commons.compress.compressors.lzma.LZMAUtils.isCompressedFilename(String)
  Use `LZMAUtils.isCompressedFileName(String)`.
  org.apache.commons.compress.compressors.xz.XZUtils.getCompressedFilename(String)
  Use `XZUtils.getCompressedFileName(String)`.
  org.apache.commons.compress.compressors.xz.XZUtils.getUncompressedFilename(String)
  Use `XZUtils.getUncompressedFileName(String)`.
  org.apache.commons.compress.compressors.xz.XZUtils.isCompressedFilename(String)
  Use `XZUtils.isCompressedFileName(String)`.

- Deprecated Constructors
  Constructor
  Description
  org.apache.commons.compress.archivers.sevenz.SevenZFile(File, byte[])
  use the char[]-arg version for the password instead
  org.apache.commons.compress.archivers.sevenz.SevenZFile(SeekableByteChannel, byte[])
  use the char[]-arg version for the password instead
  org.apache.commons.compress.archivers.sevenz.SevenZFile(SeekableByteChannel, String, byte[])
  use the char[]-arg version for the password instead
  org.apache.commons.compress.archivers.tar.TarArchiveOutputStream(OutputStream, int, int)
  recordSize must always be 512 bytes. An IllegalArgumentException will be thrown if any other value is used
  org.apache.commons.compress.archivers.tar.TarArchiveOutputStream(OutputStream, int, int, String)
  recordSize must always be 512 bytes. An IllegalArgumentException will be thrown if any other value is used.