public FormDataParser createParser ( final HttpServerExchange exchange ) { FormDataParser existing = exchange . getAttachment ( ATTACHMENT_KEY ) ; if ( existing != null ) { return existing ; } for ( int i = 0 ; i < parserDefinitions . length ; ++ i ) { FormDataParser parser = parserDefinitions [ i ] . create ( exchange ) ; if ( parser != null ) { exchange . putAttachment ( ATTACHMENT_KEY , parser ) ; return parser ; } } return null ; }
Creates a form data parser for this request . If a parser has already been created for the request the existing parser will be returned rather than creating a new one .