Class ResourceSection

All Implemented Interfaces:
Broadcaster, Listener, Repeater, Transceiver, CreatedAt, Modifiable, ModifiedAt, ByteSized, Receiver, Transmitter, NamedObject, StringSource, Deletable, Readable, ReadableResource, Resource, Resourceful, ResourcePathed, UriIdentified

public class ResourceSection extends BaseReadableResource
A portion of a resource from one offset into the resource to another.
Author:
jonathanl (shibo)
  • Constructor Details

    • ResourceSection

      public ResourceSection(Resource parent, long startOffset, long endOffset)
      Parameters:
      parent - The parent resource to read from
      startOffset - The start offset, inclusive
      endOffset - The end offset, exclusive
  • Method Details

    • createdAt

      public Time createdAt()
      Description copied from interface: CreatedAt
      Returns the time at which this object was created
    • onOpenForReading

      public InputStream onOpenForReading()
      Description copied from interface: Readable
      Opens the input stream to this readable
    • sizeInBytes

      public Bytes sizeInBytes()
      Returns:
      The number of bytes in this object
    • toString

      public String toString()
      Overrides:
      toString in class BaseReadableResource