Top Description Fields Constructors Methods
org.apache.tomcat.jakartaee

public Class ManifestConverter

extends Object
implements Converter
Class Inheritance
All Implemented Interfaces
org.apache.tomcat.jakartaee.Converter
Imports
java.io.ByteArrayInputStream, .IOException, .InputStream, .OutputStream, java.util.ArrayList, .List, .Map, .Map.Entry, java.util.jar.Attributes, .JarFile, .Manifest, java.util.logging.Level, .Logger, java.util.regex.Matcher, .Pattern, org.apache.commons.io.IOUtils

Updates Manifests.

Field Summary

Modifier and TypeField and Description
private static final Logger
private static final StringManager

Constructor Summary

AccessConstructor and Description
public
ManifestConverter()

Manifest converter constructor.

Method Summary

Modifier and TypeMethod and Description
public boolean
accepts(String
the file name
filename
)

Implements org.apache.tomcat.jakartaee.Converter.accepts.

Check if the file can be processed by this converter.
public boolean
convert(String
The path to the data being converted
path
,
InputStream
The source data to convert
src
,
OutputStream
The destination to write the converted data
dest
,
EESpecProfile
The profile that defines the conversion required
profile
)

Implements org.apache.tomcat.jakartaee.Converter.convert.

Copies the source to the destination, converting it if necessary, according to the requirements of the given profile.
private boolean
private void
private String
replaceVersion(String entryValue)

private boolean
updateValues(Manifest manifest, EESpecProfile profile)

private boolean
updateValues(Attributes attributes, EESpecProfile profile)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

loggerback to summary
private static final Logger logger
smback to summary
private static final StringManager sm

Constructor Detail

ManifestConverterback to summary
public ManifestConverter()

Manifest converter constructor.

Method Detail

acceptsback to summary
public boolean accepts(String filename)

Implements org.apache.tomcat.jakartaee.Converter.accepts.

Doc from org.apache.tomcat.jakartaee.Converter.accepts.

Check if the file can be processed by this converter.

Parameters
filename:String

the file name

Returns:boolean

true if the converter will process this file

Annotations
@Override
convertback to summary
public boolean convert(String path, InputStream src, OutputStream dest, EESpecProfile profile) throws IOException

Implements org.apache.tomcat.jakartaee.Converter.convert.

Doc from org.apache.tomcat.jakartaee.Converter.convert.

Copies the source to the destination, converting it if necessary, according to the requirements of the given profile.

Parameters
path:String

The path to the data being converted

src:InputStream

The source data to convert

dest:OutputStream

The destination to write the converted data

profile:EESpecProfile

The profile that defines the conversion required

Returns:boolean

true if the converter made a conversion to the file

Annotations
@Override
Exceptions
IOException:
If the conversion fails
isCryptoSignatureEntryback to summary
private boolean isCryptoSignatureEntry(Attributes attributes)
removeSignaturesback to summary
private void removeSignatures(Manifest manifest)
replaceVersionback to summary
private String replaceVersion(String entryValue)
updateValuesback to summary
private boolean updateValues(Manifest manifest, EESpecProfile profile)
updateValuesback to summary
private boolean updateValues(Attributes attributes, EESpecProfile profile)