# 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.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.dump.DumpArchiveInputStream.getCount()
  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.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.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.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.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

- 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.