Class StreamProvider
- java.lang.Object
-
- com.github.davidmoten.odata.client.StreamProvider
-
- All Implemented Interfaces:
StreamProviderBase
public final class StreamProvider extends Object implements StreamProviderBase
-
-
Constructor Summary
Constructors Constructor Description StreamProvider(ContextPath contextPath, RequestOptions options, String contentType, String base64)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StreamProviderconnectTimeout(long duration, TimeUnit unit)StringcontentType()Returns the HTTP ContentType for the content delivered byget()method.InputStreamget()Returns aInputStreamfor the requested content every time this method is called.StreamProviderreadTimeout(long duration, TimeUnit unit)StreamProviderrequestHeader(String name, String value)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.github.davidmoten.odata.client.StreamProviderBase
getBytes, getStringUtf8
-
-
-
-
Constructor Detail
-
StreamProvider
public StreamProvider(ContextPath contextPath, RequestOptions options, String contentType, String base64)
-
-
Method Detail
-
requestHeader
public StreamProvider requestHeader(String name, String value)
-
connectTimeout
public StreamProvider connectTimeout(long duration, TimeUnit unit)
-
readTimeout
public StreamProvider readTimeout(long duration, TimeUnit unit)
-
get
public InputStream get()
Description copied from interface:StreamProviderBaseReturns aInputStreamfor the requested content every time this method is called. Note that the returned `InputStream` must be closed after read otherwise the http client may hang on a later request. Use thecontentType()method to get the mime type of the content delivered via the InputStream.- Specified by:
getin interfaceStreamProviderBase- Returns:
- InputStream for the requested content that must be closed after use
-
-