public class InputStreamParameter extends HTTPParameter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PARAMETER_DEFAULT_NAME
Default parameter name to use for a body parameter.
|
Constructor and Description |
---|
InputStreamParameter() |
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
getValue()
Note: if this class is used with default \@HttpServiceMethod annotation designated as a body parameter,
you do not need to close the stream manually, it will be automatically closed when the connection disconnects.
|
boolean |
hasValues() |
void |
initialize(java.io.InputStream stream)
Initialize this parameter based on input stream
Override this method if you want to accept HTTP Body data.
|
void |
initialize(java.util.List<java.lang.String> parameterValues)
Initialize this parameter based on the given parameter values
|
void |
initialize(java.lang.String parameterValue)
Initialize this parameter based on the given parameter value
|
getParameterName, initializeRaw, initializeRaw, setParameterName
public static final java.lang.String PARAMETER_DEFAULT_NAME
public InputStreamParameter()
public void initialize(java.util.List<java.lang.String> parameterValues) throws java.lang.UnsupportedOperationException
HTTPParameter
initialize
in class HTTPParameter
parameterValues
- can NOT be nulljava.lang.UnsupportedOperationException
public void initialize(java.lang.String parameterValue) throws java.lang.UnsupportedOperationException
HTTPParameter
initialize
in class HTTPParameter
parameterValue
- can be nulljava.lang.UnsupportedOperationException
public boolean hasValues()
hasValues
in class HTTPParameter
public void initialize(java.io.InputStream stream)
HTTPParameter
initialize
in class HTTPParameter
stream
- can be nullpublic java.io.InputStream getValue()
getValue
in class HTTPParameter
Copyright © 2015 Tampere University of Technology, Pori Department.