Class S3RangeSpec


  • public class S3RangeSpec
    extends java.lang.Object
    This class is Range Spec for Amazon S3 API.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected S3RangeSpec​(boolean isValid)  
        S3RangeSpec​(long start, long end)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getLength​(long objectSize)
      Get real length of object.
      long getOffset​(long objectSize)
      Get real offset of object.
      • Methods inherited from class java.lang.Object

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

      • INVALID_S3_RANGE_SPEC

        public static final S3RangeSpec INVALID_S3_RANGE_SPEC
    • Constructor Detail

      • S3RangeSpec

        protected S3RangeSpec​(boolean isValid)
        Parameters:
        isValid - the spec is valid or not
      • S3RangeSpec

        public S3RangeSpec​(long start,
                           long end)
        Parameters:
        start - the start offset of object
        end - the end offset of object
    • Method Detail

      • getLength

        public long getLength​(long objectSize)
        Get real length of object.
        Parameters:
        objectSize - the object size
        Returns:
        the real object length referring to range
      • getOffset

        public long getOffset​(long objectSize)
        Get real offset of object.
        Parameters:
        objectSize - the object size
        Returns:
        the real object offset referring to range