Class ByteBufferRangeWriter

java.lang.Object
org.eclipse.jetty.server.resource.ByteBufferRangeWriter
All Implemented Interfaces:
Closeable, AutoCloseable, RangeWriter

public class ByteBufferRangeWriter extends Object implements RangeWriter
ByteBuffer based RangeWriter
  • Constructor Details

    • ByteBufferRangeWriter

      public ByteBufferRangeWriter(ByteBuffer buffer)
  • Method Details

    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • writeTo

      public void writeTo(OutputStream outputStream, long skipTo, long length) throws IOException
      Description copied from interface: RangeWriter
      Write the specific range (start, size) to the outputStream.
      Specified by:
      writeTo in interface RangeWriter
      Parameters:
      outputStream - the stream to write to
      skipTo - the offset / skip-to / seek-to / position in the resource to start the write from
      length - the size of the section to write
      Throws:
      IOException