public static interface Connection.KeyVal
Modifier and Type | Method and Description |
---|---|
java.lang.String |
contentType()
Get the current Content Type, or
null if not set. |
Connection.KeyVal |
contentType(java.lang.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?
|
java.io.InputStream |
inputStream()
Get the input stream associated with this keyval, if any
|
Connection.KeyVal |
inputStream(java.io.InputStream inputStream)
Add or update an input stream to this keyVal
|
java.lang.String |
key()
Get the key of a keyval
|
Connection.KeyVal |
key(java.lang.String key)
Update the key of a keyval
|
java.lang.String |
value()
Get the value of a keyval
|
Connection.KeyVal |
value(java.lang.String value)
Update the value of a keyval
|
Connection.KeyVal key(java.lang.String key)
key
- new keyjava.lang.String key()
Connection.KeyVal value(java.lang.String value)
value
- the new valuejava.lang.String value()
Connection.KeyVal inputStream(java.io.InputStream inputStream)
inputStream
- new input streamjava.io.InputStream inputStream()
boolean hasInputStream()
Connection.KeyVal contentType(java.lang.String contentType)
inputStream(java.io.InputStream)
is set.
Will default to application/octet-stream
.
contentType
- the new content typejava.lang.String contentType()
null
if not set.