public class ResolvingReaderResource extends ReaderResource
ReaderResource
that allows automatic resolution of SVL variables.Modifier and Type | Class and Description |
---|---|
static class |
ResolvingReaderResource.Builder
Builder class for constructing
ResolvingReaderResource objects. |
contents
Modifier | Constructor and Description |
---|---|
|
ResolvingReaderResource(MediaType mediaType,
Map<String,Object> headers,
boolean cached,
VarResolverSession varSession,
Object... contents)
Constructor.
|
protected |
ResolvingReaderResource(ResolvingReaderResource.Builder b)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static ResolvingReaderResource.Builder |
create()
Creates a new instance of a
ResolvingReaderResource.Builder for this class. |
Writer |
writeTo(Writer w)
Serialize this object to the specified writer.
|
getContents, getHeaders, getMediaType, toCommentStrippedString, toString
protected ResolvingReaderResource(ResolvingReaderResource.Builder b) throws IOException
b
- Builder containing values to initialize this object with.IOException
- Thrown by underlying stream.public ResolvingReaderResource(MediaType mediaType, Map<String,Object> headers, boolean cached, VarResolverSession varSession, Object... contents) throws IOException
mediaType
- The resource media type.headers
- The HTTP response headers for this streamed resource.varSession
- Optional variable resolver for resolving variables in the string.cached
- Identifies if this resource is cached in memory.
contents
- The resource contents.
IOException
- Thrown by underlying stream.public static ResolvingReaderResource.Builder create()
ResolvingReaderResource.Builder
for this class.ResolvingReaderResource.Builder
.@ResponseBody public Writer writeTo(Writer w) throws IOException
Writable
writeTo
in interface Writable
writeTo
in class ReaderResource
w
- The writer to write to.IOException
- Thrown by underlying stream.Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.