public class OverrideNameWrapper extends Object implements NamedResource
Resource
to provide a name.
If no name has been provided and the wrapped Resource
is a
NamedResource
, the name of the underlying NamedResource
is
used.Constructor and Description |
---|
OverrideNameWrapper(Resource delegate)
Wraps the resource with no overridden name.
|
OverrideNameWrapper(Resource delegate,
String name)
Wraps the resource and override its name.
|
Modifier and Type | Method and Description |
---|---|
Resource |
getDelegate() |
InputStream |
getInputStream()
Stream that contains the template content.
|
String |
getName()
Get the name for the resource.
|
public OverrideNameWrapper(Resource delegate)
delegate
- the wrapped resourcepublic InputStream getInputStream() throws IOException
Resource
InputStream
is created. You MUST close the input stream after
using it.getInputStream
in interface Resource
IOException
- when the input stream can't be accessed or readpublic String getName()
NamedResource
getName
in interface NamedResource
public Resource getDelegate()
Copyright © 2021. All rights reserved.