protected class ProxyServlet.ProxyInputStreamContentProvider extends InputStreamContentProvider
ContentProvider.TypedCallback.Adapter| Modifier | Constructor and Description |
|---|---|
protected |
ProxyServlet.ProxyInputStreamContentProvider(Request proxyRequest,
HttpServletRequest request,
InputStream input) |
| Modifier and Type | Method and Description |
|---|---|
long |
getLength() |
protected ByteBuffer |
onRead(byte[] buffer,
int offset,
int length)
Callback method invoked just after having read from the stream,
but before returning the iteration element (a
ByteBuffer
to the caller. |
protected void |
onReadFailure(Throwable failure)
Callback method invoked when an exception is thrown while reading
from the stream.
|
protected ByteBuffer |
onRequestContent(Request proxyRequest,
HttpServletRequest request,
byte[] buffer,
int offset,
int length) |
close, failed, iterator, succeededprotected ProxyServlet.ProxyInputStreamContentProvider(Request proxyRequest, HttpServletRequest request, InputStream input)
public long getLength()
getLength in interface ContentProvidergetLength in class InputStreamContentProviderprotected ByteBuffer onRead(byte[] buffer, int offset, int length)
InputStreamContentProviderByteBuffer
to the caller.
Subclasses may override this method to copy the content read from
the stream to another location (a file, or in memory if the content
is known to fit).onRead in class InputStreamContentProviderbuffer - the byte array containing the bytes readoffset - the offset from where bytes should be readlength - the length of the bytes readByteBuffer wrapping the byte arrayprotected ByteBuffer onRequestContent(Request proxyRequest, HttpServletRequest request, byte[] buffer, int offset, int length)
protected void onReadFailure(Throwable failure)
InputStreamContentProvideronReadFailure in class InputStreamContentProviderfailure - the exception thrown while reading from the stream.Copyright © 1995-2015 Webtide. All Rights Reserved.