private InterfaceHttpData findMultipartDelimiter ( String delimiter , MultiPartStatus dispositionStatus , MultiPartStatus closeDelimiterStatus ) { // --AaB03x or --AaB03x-- int readerIndex = undecodedChunk . readerIndex ( ) ; try { skipControlCharacters ( undecodedChunk ) ; } catch ( NotEnoughDataDecoderException ignored ) { undecodedChunk . readerIndex ( readerIndex ) ; return null ; } skipOneLine ( ) ; String newline ; try { newline = readDelimiter ( undecodedChunk , delimiter ) ; } catch ( NotEnoughDataDecoderException ignored ) { undecodedChunk . readerIndex ( readerIndex ) ; return null ; } if ( newline . equals ( delimiter ) ) { currentStatus = dispositionStatus ; return decodeMultipart ( dispositionStatus ) ; } if ( newline . equals ( delimiter + "--" ) ) { // CLOSEDELIMITER or MIXED CLOSEDELIMITER found currentStatus = closeDelimiterStatus ; if ( currentStatus == MultiPartStatus . HEADERDELIMITER ) { // MIXEDCLOSEDELIMITER // end of the Mixed part currentFieldAttributes = null ; return decodeMultipart ( MultiPartStatus . HEADERDELIMITER ) ; } return null ; } undecodedChunk . readerIndex ( readerIndex ) ; throw new ErrorDataDecoderException ( "No Multipart delimiter found" ) ; }
Find the next Multipart Delimiter