public class InputStreamRangeWriter extends java.lang.Object implements RangeWriter
| Modifier and Type | Class and Description |
|---|---|
static interface |
InputStreamRangeWriter.InputStreamSupplier |
| Modifier and Type | Field and Description |
|---|---|
static int |
NO_PROGRESS_LIMIT |
| Constructor and Description |
|---|
InputStreamRangeWriter(InputStreamRangeWriter.InputStreamSupplier inputStreamSupplier)
Create InputStremRangeWriter
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
writeTo(java.io.OutputStream outputStream,
long skipTo,
long length)
Write the specific range (start, size) to the outputStream.
|
public static final int NO_PROGRESS_LIMIT
public InputStreamRangeWriter(InputStreamRangeWriter.InputStreamSupplier inputStreamSupplier)
inputStreamSupplier - Supplier of the InputStream. If the stream needs to be regenerated, such as the next
requested range being before the current position, then the current InputStream is closed and a new one obtained
from this supplier.public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionpublic void writeTo(java.io.OutputStream outputStream,
long skipTo,
long length)
throws java.io.IOException
RangeWriterwriteTo in interface RangeWriteroutputStream - the stream to write toskipTo - the offset / skip-to / seek-to / position in the resource to start the write fromlength - the size of the section to writejava.io.IOExceptionCopyright © 1995–2021 Webtide. All rights reserved.