Top Description Methods
org.apache.tomcat.jakartaee

public Interface Converter

Known Direct Implementers
org.apache.tomcat.jakartaee.ManifestConverter, org.apache.tomcat.jakartaee.PassThroughConverter, org.apache.tomcat.jakartaee.TextConverter, org.apache.tomcat.jakartaee.ClassConverter
Imports
java.io.IOException, .InputStream, .OutputStream

The main Converter interface, used for package prefix conversion.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the converter will process this file
accepts
(String
the file name
filename
)

Check if the file can be processed by this converter.

public boolean

Returns:

true if the converter made a conversion to the file
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
)

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

Method Detail

acceptsback to summary
public boolean accepts(String filename)

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

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

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

Exceptions
IOException:
If the conversion fails