Class FileItemResource

  • All Implemented Interfaces:
    com.helger.commons.io.IHasInputStream, com.helger.commons.io.IHasInputStreamAndReader, com.helger.commons.io.resource.IReadableResource, com.helger.commons.io.resource.IResourceBase

    @NotThreadSafe
    public class FileItemResource
    extends Object
    implements com.helger.commons.io.resource.IReadableResource
    Implementation of the IReadableResource interface for uploaded IFileItem objects.
    Author:
    Philip Helger
    • Constructor Detail

    • Method Detail

      • getResourceID

        @Nonnull
        public String getResourceID()
        Specified by:
        getResourceID in interface com.helger.commons.io.resource.IResourceBase
      • getPath

        @Nonnull
        public String getPath()
        Specified by:
        getPath in interface com.helger.commons.io.resource.IResourceBase
      • getInputStream

        @Nullable
        public InputStream getInputStream()
        Specified by:
        getInputStream in interface com.helger.commons.io.IHasInputStream
      • isReadMultiple

        public boolean isReadMultiple()
        Specified by:
        isReadMultiple in interface com.helger.commons.io.IHasInputStream
      • exists

        public boolean exists()
        Specified by:
        exists in interface com.helger.commons.io.resource.IResourceBase
      • getAsURL

        @Nullable
        public URL getAsURL()
        Specified by:
        getAsURL in interface com.helger.commons.io.resource.IResourceBase
      • getAsFile

        @Nullable
        public File getAsFile()
        Specified by:
        getAsFile in interface com.helger.commons.io.resource.IResourceBase
      • getReadableCloneForPath

        @Nonnull
        @UnsupportedOperation
        public com.helger.commons.io.resource.IReadableResource getReadableCloneForPath​(@Nonnull
                                                                                        String sPath)
        Specified by:
        getReadableCloneForPath in interface com.helger.commons.io.resource.IReadableResource
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object