Class AbstractWrappedWritableResource
- java.lang.Object
-
- com.helger.commons.io.resource.wrapped.AbstractWrappedWritableResource
-
- All Implemented Interfaces:
IHasOutputStream,IHasOutputStreamAndWriter,IResourceBase,IWritableResource,IWrappedWritableResource
- Direct Known Subclasses:
GZIPWritableResource
public abstract class AbstractWrappedWritableResource extends Object implements IWrappedWritableResource
A wrapper around a writable resource forOutputStreammanipulation .- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractWrappedWritableResource(IWritableResource aBaseResource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanexists()FilegetAsFile()URLgetAsURL()StringgetPath()StringgetResourceID()IWritableResourcegetWrappedWritableResource()StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.helger.commons.io.IHasOutputStream
getBufferedOutputStream, getOutputStream
-
Methods inherited from interface com.helger.commons.io.IHasOutputStreamAndWriter
getBufferedWriter, getWriter
-
Methods inherited from interface com.helger.commons.io.resource.wrapped.IWrappedWritableResource
isWriteMultiple
-
Methods inherited from interface com.helger.commons.io.resource.IWritableResource
getWritableCloneForPath
-
-
-
-
Constructor Detail
-
AbstractWrappedWritableResource
protected AbstractWrappedWritableResource(@Nonnull IWritableResource aBaseResource)
-
-
Method Detail
-
getWrappedWritableResource
@Nonnull public IWritableResource getWrappedWritableResource()
- Specified by:
getWrappedWritableResourcein interfaceIWrappedWritableResource- Returns:
- The wrapped resource. May not be
null.
-
getResourceID
@Nonnull public String getResourceID()
- Specified by:
getResourceIDin interfaceIResourceBase- Returns:
- A non-
nullresource ID used e.g. for system IDs in XML resolving.
-
getPath
@Nonnull public String getPath()
- Specified by:
getPathin interfaceIResourceBase- Returns:
- The requested path. Never
null
-
exists
public boolean exists()
- Specified by:
existsin interfaceIResourceBase- Returns:
trueif the resource exists,falseotherwise.
-
getAsURL
@Nullable public URL getAsURL()
- Specified by:
getAsURLin interfaceIResourceBase- Returns:
- the URL representation of this resource. May be
nullif this resource cannot be represented as an URL.
-
getAsFile
@Nullable public File getAsFile()
- Specified by:
getAsFilein interfaceIResourceBase- Returns:
- the File representation of this resource. May be
nullif this resource cannot be represented as a file.
-
-