Package org.apache.juneau.httppart
Class SimplePartParserSession
java.lang.Object
org.apache.juneau.httppart.BaseHttpPartParserSession
org.apache.juneau.httppart.SimplePartParserSession
- All Implemented Interfaces:
HttpPartParserSession
Session object that lives for the duration of a single use of
SimplePartParser
.
Notes:
- This class is not thread safe and is typically discarded after one use.
See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> T
parse
(HttpPartType partType, HttpPartSchema schema, String in, ClassMeta<T> toType) Converts the specified input to the specified class type.
-
Constructor Details
-
SimplePartParserSession
public SimplePartParserSession()
-
-
Method Details
-
parse
public <T> T parse(HttpPartType partType, HttpPartSchema schema, String in, ClassMeta<T> toType) throws ParseException, SchemaValidationException Description copied from interface:HttpPartParserSession
Converts the specified input to the specified class type.- Type Parameters:
T
- The POJO type to transform the input into.- Parameters:
partType
- The part type being parsed.schema
- Schema information about the part.
May benull .
Not all part parsers use the schema information.in
- The input being parsed.toType
- The POJO type to transform the input into.- Returns:
- The parsed value.
- Throws:
ParseException
- Malformed input encountered.SchemaValidationException
- If the input or resulting HTTP part object fails schema validation.
-