Constructor and Description |
---|
InputStreamBody(Context ctx,
InputStream stream,
long contentLength) |
Modifier and Type | Method and Description |
---|---|
byte[] |
bytes()
HTTP body as byte array.
|
ReadableByteChannel |
channel()
Body as readable channel.
|
ValueNode |
get(int index)
Get a value at the given position.
|
ValueNode |
get(String name)
Get a value that matches the given name.
|
long |
getSize()
Size in bytes.
|
boolean |
isInMemory()
True if body is on memory.
|
String |
name()
Name of this value or
null . |
InputStream |
stream()
Body as input stream.
|
<T> T |
to(Type type)
Convert this body into the given type.
|
List<String> |
toList()
Get list of values.
|
Map<String,List<String>> |
toMultimap()
Value as multi-value map.
|
String |
value()
Get string value.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
iterator, resolve, resolve, resolve, resolve, size
forEach, spliterator
array, booleanValue, booleanValue, byteValue, byteValue, create, create, doubleValue, doubleValue, floatValue, floatValue, hash, headers, intValue, intValue, isArray, isMissing, isObject, isPresent, isSingle, longValue, longValue, missing, toEnum, toEnum, toMap, toOptional, toOptional, toSet, value, value, value, valueOrNull
public InputStreamBody(Context ctx, InputStream stream, long contentLength)
public byte[] bytes()
Body
public boolean isInMemory()
Body
ServerOptions.getMaxRequestSize()
will be dump to disk.isInMemory
in interface Body
public ReadableByteChannel channel()
Body
public long getSize()
Body
Content-Length
header.public InputStream stream()
Body
@Nonnull public ValueNode get(@Nonnull int index)
ValueNode
@Nonnull public ValueNode get(@Nonnull String name)
ValueNode
@Nonnull public <T> T to(@Nonnull Type type)
Body
@Nonnull public List<String> toList()
Value
Copyright © 2022. All rights reserved.