Class ByteBufferRangeWriter

  • All Implemented Interfaces:, java.lang.AutoCloseable, RangeWriter

    public class ByteBufferRangeWriter
    extends java.lang.Object
    implements RangeWriter
    ByteBuffer based RangeWriter
    • Constructor Summary

      Constructor Description
      ByteBufferRangeWriter​(java.nio.ByteBuffer buffer)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      void writeTo​( outputStream, long skipTo, long length)
      Write the specific range (start, size) to the outputStream.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ByteBufferRangeWriter

        public ByteBufferRangeWriter​(java.nio.ByteBuffer buffer)
    • Method Detail

      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface
      • writeTo

        public void writeTo​( outputStream,
                            long skipTo,
                            long length)
        Description copied from interface: RangeWriter
        Write the specific range (start, size) to the outputStream.
        Specified by:
        writeTo in interface RangeWriter
        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