src/main/java/js/http/form/FormIteratorImpl.java
@Override
	public boolean hasNext() {
		try {
			if (currentPart != null) {
				currentPart.close();
			}
			if (!fileItemIterator.hasNext()) {
				return false;
			}
			FileItemStream fileItemStream = fileItemIterator.next();
			if (fileItemStream.isFormField()) {
				currentPart = new FormFieldImpl(fileItemStream);
			} else {
				currentPart = new UploadStreamImpl(fileItemStream);
			}
			return true;
		} catch (IOException | FileUploadException e) {
			log.error(e);
		}
		return false;
	}
@Override
	public boolean hasNext() {
		try {
			if (currentPart != null) {
				currentPart.close();
			}
			if (!fileItemIterator.hasNext()) {
				return false;
			}
			FileItemStream fileItemStream = fileItemIterator.next();
			if (fileItemStream.isFormField()) {
				currentPart = new FormFieldImpl(fileItemStream);
			} else {
				currentPart = new UploadStreamImpl(fileItemStream);
			}
			return true;
		} catch (IOException | FileUploadException e) {
			log.error(e);
		}
		return false;
	}
@ Override public boolean hasNext ( ) { try { if ( currentPart != null ) { currentPart . close ( ) ; } if ( ! fileItemIterator . hasNext ( ) ) { return false ; } FileItemStream fileItemStream = fileItemIterator . next ( ) ; if ( fileItemStream . isFormField ( ) ) { currentPart = new FormFieldImpl ( fileItemStream ) ; } else { currentPart = new UploadStreamImpl ( fileItemStream ) ; } return true ; } catch ( IOException | FileUploadException e ) { log . error ( e ) ; } return false ; }
Test if there are more parts on this form iterator. This implementation has side effects: it takes care to close form
parts while traversing form iterator.

@return true if there is at least one available form part.
Test if there are more parts on this form iterator . This implementation has side effects : it takes care to close form parts while traversing form iterator .