Class SeekableByteChannelRangeWriter
java.lang.Object
org.eclipse.jetty.server.resource.SeekableByteChannelRangeWriter
- All Implemented Interfaces:
Closeable
,AutoCloseable
,RangeWriter
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ByteBuffer
private final int
private SeekableByteChannel
private final SeekableByteChannelRangeWriter.ChannelSupplier
private boolean
static final int
private long
-
Constructor Summary
ConstructorsConstructorDescriptionSeekableByteChannelRangeWriter
(SeekableByteChannel initialChannel, SeekableByteChannelRangeWriter.ChannelSupplier channelSupplier) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
private void
fallbackSkipTo
(long skipTo) private void
skipTo
(long skipTo) void
writeTo
(OutputStream outputStream, long skipTo, long length) Write the specific range (start, size) to the outputStream.
-
Field Details
-
NO_PROGRESS_LIMIT
public static final int NO_PROGRESS_LIMIT- See Also:
-
channelSupplier
-
bufSize
private final int bufSize -
buffer
-
channel
-
pos
private long pos -
defaultSeekMode
private boolean defaultSeekMode
-
-
Constructor Details
-
SeekableByteChannelRangeWriter
public SeekableByteChannelRangeWriter(SeekableByteChannelRangeWriter.ChannelSupplier channelSupplier) -
SeekableByteChannelRangeWriter
public SeekableByteChannelRangeWriter(SeekableByteChannel initialChannel, SeekableByteChannelRangeWriter.ChannelSupplier channelSupplier)
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
writeTo
Description copied from interface:RangeWriter
Write the specific range (start, size) to the outputStream.- Specified by:
writeTo
in interfaceRangeWriter
- Parameters:
outputStream
- 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 write- Throws:
IOException
-
skipTo
- Throws:
IOException
-
fallbackSkipTo
- Throws:
IOException
-