Package org.apache.tomcat.jakartaee
Interface Converter
-
- All Known Implementing Classes:
ClassConverter
,ManifestConverter
,PassThroughConverter
,TextConverter
public interface Converter
The main Converter interface, used for package prefix conversion.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
accepts(java.lang.String filename)
Check if the file can be processed by this converter.boolean
convert(java.lang.String path, java.io.InputStream src, java.io.OutputStream dest, EESpecProfile profile)
Copies the source to the destination, converting it if necessary, according to the requirements of the given profile.
-
-
-
Method Detail
-
accepts
boolean accepts(java.lang.String filename)
Check if the file can be processed by this converter.- Parameters:
filename
- the file name- Returns:
- true if the converter will process this file
-
convert
boolean convert(java.lang.String path, java.io.InputStream src, java.io.OutputStream dest, EESpecProfile profile) throws java.io.IOException
Copies the source to the destination, converting it if necessary, according to the requirements of the given profile.- Parameters:
path
- The path to the data being convertedsrc
- The source data to convertdest
- The destination to write the converted dataprofile
- The profile that defines the conversion required- Returns:
- true if the converter made a conversion to the file
- Throws:
java.io.IOException
- If the conversion fails
-
-