public class PartWriterCallback extends AbstractResource.WriteCallback
writeData(org.apache.wicket.request.resource.IResource.Attributes)
method.Constructor and Description |
---|
PartWriterCallback(InputStream inputStream,
Long contentLength,
Long startbyte,
Long endbyte)
Creates a part writer callback.
Reads a part of the given input stream. |
Modifier and Type | Method and Description |
---|---|
int |
getBufferSize()
Sets the buffer size used to send the data to the client
|
boolean |
isClose()
If the given input stream is going to be closed
|
PartWriterCallback |
setBufferSize(int bufferSize)
Sets the buffer size used to send the data to the client
|
PartWriterCallback |
setClose(boolean close)
If set true the given input stream is going to be closed
|
void |
writeData(IResource.Attributes attributes)
Writes the data
|
writeStream
public PartWriterCallback(InputStream inputStream, Long contentLength, Long startbyte, Long endbyte)
inputStream
- the input stream to read fromcontentLength
- content length of the input stream. Ignored if endByte is specifiedstartbyte
- the start position to read from (if not null the number of bytes are skipped till
the stream is read)endbyte
- the end position to read to (if not null the stream is going to be read till
endbyte, else to the end of the whole stream)public void writeData(IResource.Attributes attributes) throws IOException
writeData
in class AbstractResource.WriteCallback
attributes
- the attributes to get the output stream of the responseIOException
- if something went wrong while writing the data to the output streampublic int getBufferSize()
public PartWriterCallback setBufferSize(int bufferSize)
bufferSize
- the buffer size used to send the data to the clientpublic boolean isClose()
public PartWriterCallback setClose(boolean close)
close
- if the given input stream is going to be closedCopyright © 2006–2022 Apache Software Foundation. All rights reserved.