Package org.eclipse.jetty.http
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.Part
s that can
be accessed by index or by name, or iterated over.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
get
(int index) Returns theMultiPart.Part
at the given index, a number between0
included and the value returned bysize()
excluded.Returns all theMultiPart.Part
s with the given name.Returns the firstMultiPart.Part
with the given name, ornull
if noMultiPart.Part
with that name exists.iterator()
int
size()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
get
Returns the
MultiPart.Part
at the given index, a number between0
included and the value returned bysize()
excluded.- Parameters:
index
- the index of theMultiPart.Part
to return- Returns:
- the
MultiPart.Part
at the given index
-
getFirst
Returns the first
MultiPart.Part
with the given name, ornull
if noMultiPart.Part
with that name exists.- Parameters:
name
- theMultiPart.Part
name- Returns:
- the first
MultiPart.Part
with the given name, ornull
-
getAll
Returns all the
MultiPart.Part
s with the given name.- Parameters:
name
- theMultiPart.Part
s name- Returns:
- all the
MultiPart.Part
s with the given name
-
size
public int size()- Returns:
- the number of parts
- See Also:
-
iterator
- Specified by:
iterator
in interfaceIterable<MultiPart.Part>
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-