org.glassfish.jersey.message.internal
Interface OutboundMessageContext.StreamProvider
- Enclosing class:
- OutboundMessageContext
public static interface OutboundMessageContext.StreamProvider
The callback interface which is used to get the terminal output stream into which the entity should be
written and to inform the implementation about the entity size.
getOutputStream
OutputStream getOutputStream(int contentLength)
throws IOException
- Get the output stream. This method will be called after all the
writer interceptors are called and written entity is buffered
into the buffer or the buffer exceeds.
- Parameters:
contentLength - the size of the buffered entity or -1 if the entity exceeded the maximum buffer
size or if the buffering is disabled.
- Returns:
- the adapted output stream into which the serialized entity should be written. May return null
which will cause ignoring the written entity (in that case the entity will
still be written by
message body writers
but the output will be ignored).
- Throws:
IOException - in case of an IO error.
Copyright © 2007-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.