MultipartPart class final
One part of a multipart body, still arriving.
content is the part's bytes as they come off the socket. Read it, or the next part cannot start — the parts share one connection, and skipping ahead without draining stalls the stream. skip is how you say you do not want it.
Constructors
Properties
-
content
→ Stream<
List< int> > -
The part's bytes, consumable once.
no setter
- contentType → String?
-
The part's own
content-type, when it declared one.final - filename → String?
-
The client-supplied file name, when the part was a file.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isFile → bool
-
Whether the part was a file rather than an ordinary field.
no setter
- isTaken → bool
-
Whether anything has started reading this part.
no setter
- name → String
-
The form field name.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readBytes(
{int limit = defaultBodyLimit}) → Future< Uint8List> - Collects the part into memory.
-
readText(
{int limit = defaultBodyLimit}) → Future< String> - Collects the part as UTF-8 text.
-
skip(
) → Future< void> - Discards the part, so the next one can start.
-
toString(
) → String -
A string representation of this object.
inherited
-
writeTo(
StreamConsumer< List< sink, {int limit = defaultBodyLimit}) → Future<int> >int> -
Writes the part into
sinkwithout holding it in memory.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited