Interface DeletableResource

All Superinterfaces:
org.springframework.core.io.InputStreamSource, org.springframework.core.io.Resource

public interface DeletableResource extends org.springframework.core.io.Resource
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deletes the resource.

    Methods inherited from interface org.springframework.core.io.InputStreamSource

    getInputStream

    Methods inherited from interface org.springframework.core.io.Resource

    contentLength, createRelative, exists, getContentAsByteArray, getContentAsString, getDescription, getFile, getFilename, getURI, getURL, isFile, isOpen, isReadable, lastModified, readableChannel
  • Method Details

    • delete

      void delete() throws IOException
      Deletes the resource.

      Returns true if the deletion was successful, otherwise false. If the operation returns true then the resource handle itself must be considered unreliable and should be discarded.
      Throws:
      IOException - when the resource cant be deleted