public abstract static class HTTPRequest.InputStreamProvider extends Object implements HTTPRequest.DataProvider
HTTPRequest.DataProvider implementation transmits the given InputStream.
It is copied to the OutputStream later, so you should prefer a way to feed
the OutputStream directly.
This is an abstract class, missing the HTTPRequest.DataProvider.getMimeType() and
HTTPRequest.DataProvider.getFileName() method.
| Modifier and Type | Field and Description |
|---|---|
protected InputStream |
in |
| Constructor and Description |
|---|
InputStreamProvider(InputStream in)
Creates a new InputStreamProvider.
|
| Modifier and Type | Method and Description |
|---|---|
void |
sendFile(OutputStream out)
Transfers the
InputStream to the OutputStream by copying it. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFileName, getMimeTypeprotected final InputStream in
public InputStreamProvider(InputStream in)
in - InputStreampublic void sendFile(OutputStream out) throws IOException
InputStream to the OutputStream by copying it.sendFile in interface HTTPRequest.DataProviderout - OutputStream to be filledIOException - if transmission failedCopyright © 2004–2016. All rights reserved.