public class InputStreamContentSource extends AbstractContentSource
ContentSource implementation with InputStream as underlying
byte source.BUFFER_SIZE| Constructor and Description |
|---|
InputStreamContentSource(InputStream is) |
| Modifier and Type | Method and Description |
|---|---|
long |
getLength() |
long |
writeTo(OutputStream os)
Write this content to a
OutputStream instance. |
long |
writeTo(Socket socket)
Write this content on to a network socket
|
long |
writeTo(SocketChannel socketChannel)
Write this content on to a
SocketChannel |
public InputStreamContentSource(InputStream is)
public long getLength()
public long writeTo(Socket socket) throws IOException
ContentSourcesocket - socketIOException - IOExceptionpublic long writeTo(SocketChannel socketChannel) throws IOException
ContentSourceSocketChannelsocketChannel - channelIOException - IOExceptionpublic long writeTo(OutputStream os) throws IOException
ContentSourceOutputStream instance.os - streamIOException - IOExceptionCopyright © 2019. All rights reserved.