Interface RangeWriter

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
ByteBufferRangeWriter, InputStreamRangeWriter, SeekableByteChannelRangeWriter

public interface RangeWriter extends Closeable
Interface for writing sections (ranges) of a single resource (SeekableByteChannel, Resource, etc) to an outputStream.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    writeTo(OutputStream outputStream, long skipTo, long length)
    Write the specific range (start, size) to the outputStream.

    Methods inherited from interface java.io.Closeable

    close
  • Method Details

    • writeTo

      void writeTo(OutputStream outputStream, long skipTo, long length) throws IOException
      Write the specific range (start, size) to the outputStream.
      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