No need to throw UnsupportedEncodingException from this private method.
import java.io.IOException;
import java.io.OutputStream;
import java.io.StringWriter;
-import java.io.UnsupportedEncodingException;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.nio.file.LinkOption;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
+
import org.apache.commons.compress.archivers.ArchiveEntry;
import org.apache.commons.compress.archivers.ArchiveOutputStream;
import org.apache.commons.compress.archivers.zip.ZipEncoding;
@@ -486,8 +486,7 @@ void writePaxHeaders(final TarArchiveEntry entry,
closeArchiveEntry();
}
- private byte[] encodeExtendedPaxHeadersContents(final Map<String, String> headers)
- throws UnsupportedEncodingException {
+ private byte[] encodeExtendedPaxHeadersContents(final Map<String, String> headers) {
final StringWriter w = new StringWriter();
for (final Map.Entry<String, String> h : headers.entrySet()) {
final String key = h.getKey();
