protected class ProxyServlet.ProxyInputStreamContentProvider extends InputStreamContentProvider
ContentProvider.TypedCallback.Completable, Callback.NestedInvocable.InvocationType__nonBlocking| Modifier | Constructor and Description |
|---|---|
protected |
ProxyInputStreamContentProvider(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Request proxyRequest,
java.io.InputStream input) |
| Modifier and Type | Method and Description |
|---|---|
long |
getLength() |
protected java.nio.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(java.lang.Throwable failure)
Callback method invoked when an exception is thrown while reading
from the stream.
|
protected java.nio.ByteBuffer |
onRequestContent(javax.servlet.http.HttpServletRequest request,
Request proxyRequest,
byte[] buffer,
int offset,
int length) |
close, failed, iteratorclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisReproduciblegetInvocationType, getInvocationType, invokeNonBlocking, isNonBlockingInvocationprotected ProxyInputStreamContentProvider(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Request proxyRequest,
java.io.InputStream input)
public long getLength()
getLength in interface ContentProvidergetLength in class InputStreamContentProviderprotected java.nio.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 java.nio.ByteBuffer onRequestContent(javax.servlet.http.HttpServletRequest request,
Request proxyRequest,
byte[] buffer,
int offset,
int length)
protected void onReadFailure(java.lang.Throwable failure)
InputStreamContentProvideronReadFailure in class InputStreamContentProviderfailure - the exception thrown while reading from the stream.Copyright © 1995–2018 Webtide. All rights reserved.