public class SpringResourceWrapper extends Object implements Resource
Resource
to a pac4j Resource
.Modifier and Type | Field and Description |
---|---|
protected org.springframework.core.io.Resource |
springResource |
Constructor and Description |
---|
SpringResourceWrapper(org.springframework.core.io.Resource springResource) |
Modifier and Type | Method and Description |
---|---|
boolean |
exists()
Return whether this resource actually exists in physical form.
|
String |
getFilename()
Determine a filename for this resource, i.e.
|
InputStream |
getInputStream()
Return an
InputStream . |
public SpringResourceWrapper(org.springframework.core.io.Resource springResource)
public InputStream getInputStream() throws IOException
Resource
InputStream
.
Caller is responsible for closing the streamgetInputStream
in interface Resource
null
)IOException
- if the stream could not be openedpublic boolean exists()
Resource
This method performs a definitive existence check, whereas the
existence of a Resource
handle only guarantees a
valid descriptor handle.
public String getFilename()
Resource
Returns null
if this type of resource does not
have a filename.
getFilename
in interface Resource
Copyright © 2016. All rights reserved.