HttpConnection.KeyVal
public static interface Connection.KeyVal
Modifier and Type | Method | Description |
---|---|---|
String |
contentType() |
Get the current Content Type, or
null if not set. |
Connection.KeyVal |
contentType(String contentType) |
Set the Content Type header used in the MIME body (aka mimetype) when uploading files.
|
boolean |
hasInputStream() |
Does this keyval have an input stream?
|
InputStream |
inputStream() |
Get the input stream associated with this keyval, if any
|
Connection.KeyVal |
inputStream(InputStream inputStream) |
Add or update an input stream to this keyVal
|
String |
key() |
Get the key of a keyval
|
Connection.KeyVal |
key(String key) |
Update the key of a keyval
|
String |
value() |
Get the value of a keyval
|
Connection.KeyVal |
value(String value) |
Update the value of a keyval
|
Connection.KeyVal key(String key)
key
- new keyString key()
Connection.KeyVal value(String value)
value
- the new valueString value()
Connection.KeyVal inputStream(InputStream inputStream)
inputStream
- new input streamInputStream inputStream()
boolean hasInputStream()
Connection.KeyVal contentType(String contentType)
inputStream(InputStream)
is set.
Will default to application/octet-stream
.
contentType
- the new content typeString contentType()
null
if not set.Copyright © 2009–2018 Jonathan Hedley. All rights reserved.