/**
  * Evaluate an entry's header format from a header buffer.
  *
  * @param header The tar entry header buffer to evaluate the format for.
  * @return format type
  */
 private int evaluateType(byte[] header) {
   if (ArchiveUtils.matchAsciiBuffer(MAGIC_GNU, header, MAGIC_OFFSET, MAGICLEN)) {
     return FORMAT_OLDGNU;
   }
   if (ArchiveUtils.matchAsciiBuffer(MAGIC_POSIX, header, MAGIC_OFFSET, MAGICLEN)) {
     return FORMAT_POSIX;
   }
   return 0;
 }
 private long writeArchiveHeader() throws IOException {
   byte[] header = ArchiveUtils.toAsciiBytes(ArArchiveEntry.HEADER);
   out.write(header);
   return header.length;
 }