Class ContentStoreContentPointer

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      long getCachedSize()
      Get the cached size for this content pointer.
      java.lang.String getExternalUri()
      Get an externally accessible Uri for the data.
      java.lang.String getId()
      Get the unique id for the content.
      long getLastModified()
      Get the last modified time for the resource for this pointer.
      long getSize()
      Returns the size of the content pointer's content in bytes or -1 if unknown.
      java.lang.String getStoreName()
      Get the name of the store this pointer can be retrieved in.
      java.io.InputStream getStream()
      Get as an InputStream for reading.
      int hashCode()
      void setCachedSize​(long value)
      Set the cached size for this content pointer.
      • Methods inherited from class java.lang.Object

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

      • ContentStoreContentPointer

        public ContentStoreContentPointer​(java.lang.String storeName,
                                          java.lang.String id)
      • ContentStoreContentPointer

        public ContentStoreContentPointer​(java.lang.String storeName,
                                          java.lang.String id,
                                          long cachedSize)
    • Method Detail

      • getId

        public java.lang.String getId()
        Get the unique id for the content.
        Specified by:
        getId in interface ContentPointer
      • getCachedSize

        public long getCachedSize()
        Get the cached size for this content pointer.

        Returns -1 if size has not been cached.

        Calling getSize() will use this value if available, and will populate this value if not available yet.

      • setCachedSize

        public void setCachedSize​(long value)
        Set the cached size for this content pointer.

        Returns -1 if size has not been cached.

        Calling getSize() will use this value if available, and will populate this value if not available yet.

      • getStoreName

        public java.lang.String getStoreName()
        Get the name of the store this pointer can be retrieved in.
        Specified by:
        getStoreName in interface ContentPointer
      • getExternalUri

        public java.lang.String getExternalUri()
        Get an externally accessible Uri for the data.
        Specified by:
        getExternalUri in interface ContentPointer
      • getLastModified

        public long getLastModified()
        Get the last modified time for the resource for this pointer.
        Specified by:
        getLastModified in interface ContentPointer
      • getSize

        public long getSize()
        Returns the size of the content pointer's content in bytes or -1 if unknown.
        Specified by:
        getSize in interface ContentPointer
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object