Back to project page loopback-sdk-android.
The source code is released under:
MIT License
If you think the Android project loopback-sdk-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.strongloop.android.remoting.adapters; //from w w w .j av a2 s . c om import com.loopj.android.http.RequestParams; import java.io.InputStream; /** * A request parameter that is a (binary) stream. */ public class StreamParam { private final InputStream stream; private final String fileName; private final String contentType; public StreamParam(InputStream stream, String fileName) { this(stream, fileName, null); } public StreamParam(InputStream stream, String fileName, String contentType) { this.stream = stream; this.fileName = fileName; this.contentType = contentType; } public void putTo(RequestParams params, String key) { params.put(key, stream, fileName, contentType); } }