Пример #1
0
 /**
  * Parse an entry's header information from a header buffer.
  *
  * @param header The tar entry header buffer to get information from.
  * @throws IllegalArgumentException if any of the numeric fields have an invalid format
  */
 public void parseTarHeader(byte[] header) {
   try {
     parseTarHeader(header, TarUtils.DEFAULT_ENCODING);
   } catch (IOException ex) {
     try {
       parseTarHeader(header, TarUtils.DEFAULT_ENCODING, true);
     } catch (IOException ex2) {
       // not really possible
       throw new RuntimeException(ex2);
     }
   }
 }
Пример #2
0
 /**
  * Parse an entry's header information from a header buffer.
  *
  * @param header The tar entry header buffer to get information from.
  * @param encoding encoding to use for file names
  * @since Commons Compress 1.4
  * @throws IllegalArgumentException if any of the numeric fields have an invalid format
  */
 public void parseTarHeader(byte[] header, ZipEncoding encoding) throws IOException {
   parseTarHeader(header, encoding, false);
 }
Пример #3
0
 /**
  * Construct an entry from an archive's header bytes. File is set to null.
  *
  * @param headerBuf The header bytes from a tar archive entry.
  * @param encoding encoding to use for file names
  * @since Commons Compress 1.4
  * @throws IllegalArgumentException if any of the numeric fields have an invalid format
  */
 public TarArchiveEntry(byte[] headerBuf, ZipEncoding encoding) throws IOException {
   this();
   parseTarHeader(headerBuf, encoding);
 }
Пример #4
0
 /**
  * Construct an entry from an archive's header bytes. File is set to null.
  *
  * @param headerBuf The header bytes from a tar archive entry.
  * @throws IllegalArgumentException if any of the numeric fields have an invalid format
  */
 public TarArchiveEntry(byte[] headerBuf) {
   this();
   parseTarHeader(headerBuf);
 }