Class MultiPartFormData.Parts

java.lang.Object
org.eclipse.jetty.http.MultiPartFormData.Parts
All Implemented Interfaces:
Closeable, AutoCloseable, Iterable<MultiPart.Part>
Enclosing class:
MultiPartFormData

public static class MultiPartFormData.Parts extends Object implements Iterable<MultiPart.Part>, Closeable

An ordered list of MultiPart.Parts that can be accessed by index or by name, or iterated over.

  • Method Details

    • get

      public MultiPart.Part get(int index)

      Returns the MultiPart.Part at the given index, a number between 0 included and the value returned by size() excluded.

      Parameters:
      index - the index of the MultiPart.Part to return
      Returns:
      the MultiPart.Part at the given index
    • getFirst

      public MultiPart.Part getFirst(String name)

      Returns the first MultiPart.Part with the given name, or null if no MultiPart.Part with that name exists.

      Parameters:
      name - the MultiPart.Part name
      Returns:
      the first MultiPart.Part with the given name, or null
    • getAll

      public List<MultiPart.Part> getAll(String name)

      Returns all the MultiPart.Parts with the given name.

      Parameters:
      name - the MultiPart.Parts name
      Returns:
      all the MultiPart.Parts with the given name
    • size

      public int size()
      Returns:
      the number of parts
      See Also:
    • iterator

      public Iterator<MultiPart.Part> iterator()
      Specified by:
      iterator in interface Iterable<MultiPart.Part>
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable