Package org.takes.rq.multipart
Class RqMtFake
- java.lang.Object
-
- org.takes.rq.multipart.RqMtFake
-
- All Implemented Interfaces:
Body
,Head
,Request
,RqMultipart
public final class RqMtFake extends Object implements RqMultipart
Fake decorator.- Since:
- 0.33
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStream
body()
Body.Iterable<String>
head()
All lines above the body.Iterable<String>
names()
Get all part names.Iterable<Request>
part(CharSequence name)
Get single part.
-
-
-
Method Detail
-
part
public Iterable<Request> part(CharSequence name)
Description copied from interface:RqMultipart
Get single part.- Specified by:
part
in interfaceRqMultipart
- Parameters:
name
- Name of the part to get- Returns:
- List of parts (can be empty)
-
names
public Iterable<String> names()
Description copied from interface:RqMultipart
Get all part names.- Specified by:
names
in interfaceRqMultipart
- Returns:
- All names
-
head
public Iterable<String> head() throws IOException
Description copied from interface:Head
All lines above the body.- Specified by:
head
in interfaceHead
- Returns:
- List of lines
- Throws:
IOException
- If something goes wrong
-
body
public InputStream body() throws IOException
Description copied from interface:Body
Body.- Specified by:
body
in interfaceBody
- Returns:
- Stream with body
- Throws:
IOException
- If something goes wrong
-
-