Class ByteBufferRangeWriter
- java.lang.Object
-
- org.eclipse.jetty.server.resource.ByteBufferRangeWriter
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,RangeWriter
public class ByteBufferRangeWriter extends java.lang.Object implements RangeWriter
ByteBuffer based RangeWriter
-
-
Constructor Summary
Constructors Constructor Description ByteBufferRangeWriter(java.nio.ByteBuffer buffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
writeTo(java.io.OutputStream outputStream, long skipTo, long length)
Write the specific range (start, size) to the outputStream.
-
-
-
Method Detail
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
writeTo
public void writeTo(java.io.OutputStream outputStream, long skipTo, long length) throws java.io.IOException
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:
java.io.IOException
-
-