Class AbstractWrappedWritableResource

java.lang.Object
com.helger.io.resource.wrapped.AbstractWrappedWritableResource
All Implemented Interfaces:
com.helger.base.io.iface.IHasOutputStream, com.helger.base.io.iface.IHasOutputStreamAndWriter, IResourceBase, IWritableResource, IWrappedWritableResource
Direct Known Subclasses:
GZIPWritableResource

public abstract class AbstractWrappedWritableResource extends Object implements IWrappedWritableResource
A wrapper around a writable resource for OutputStream manipulation .
Author:
Philip Helger
  • Constructor Details

    • AbstractWrappedWritableResource

      protected AbstractWrappedWritableResource(@NonNull IWritableResource aBaseResource)
  • Method Details

    • getWrappedWritableResource

      public @NonNull IWritableResource getWrappedWritableResource()
      Specified by:
      getWrappedWritableResource in interface IWrappedWritableResource
      Returns:
      The wrapped resource. May not be null.
    • getResourceID

      public @NonNull String getResourceID()
      Specified by:
      getResourceID in interface IResourceBase
      Returns:
      A non-null resource ID used e.g. for system IDs in XML resolving.
    • getPath

      public @NonNull String getPath()
      Specified by:
      getPath in interface IResourceBase
      Returns:
      The requested path. Never null
    • exists

      public boolean exists()
      Specified by:
      exists in interface IResourceBase
      Returns:
      true if the resource exists, false otherwise.
    • getAsURL

      public @Nullable URL getAsURL()
      Specified by:
      getAsURL in interface IResourceBase
      Returns:
      the URL representation of this resource. May be null if this resource cannot be represented as an URL.
    • getAsFile

      public @Nullable File getAsFile()
      Specified by:
      getAsFile in interface IResourceBase
      Returns:
      the File representation of this resource. May be null if this resource cannot be represented as a file.
    • toString

      public String toString()
      Overrides:
      toString in class Object