@Internal public class NettySystemFileCustomizableResponseType extends io.micronaut.http.server.types.files.SystemFile implements NettyFileCustomizableResponseType
File to the Netty context.| Modifier and Type | Field and Description |
|---|---|
protected java.util.Optional<io.micronaut.http.server.types.files.FileCustomizableResponseType> |
delegate |
protected java.io.RandomAccessFile |
raf |
protected long |
rafLength |
| Constructor and Description |
|---|
NettySystemFileCustomizableResponseType(java.io.File file) |
NettySystemFileCustomizableResponseType(io.micronaut.http.server.types.files.SystemFile delegate) |
| Modifier and Type | Method and Description |
|---|---|
long |
getLastModified() |
long |
getLength() |
io.micronaut.http.MediaType |
getMediaType() |
void |
process(io.micronaut.http.MutableHttpResponse response) |
void |
write(io.micronaut.http.HttpRequest<?> request,
io.micronaut.http.MutableHttpResponse<?> response,
io.netty.channel.ChannelHandlerContext context)
Write this instance to Netty.
|
protected final java.io.RandomAccessFile raf
protected final long rafLength
protected java.util.Optional<io.micronaut.http.server.types.files.FileCustomizableResponseType> delegate
public NettySystemFileCustomizableResponseType(java.io.File file)
file - The filepublic NettySystemFileCustomizableResponseType(io.micronaut.http.server.types.files.SystemFile delegate)
delegate - The system file customizable response typepublic long getLength()
getLength in interface io.micronaut.http.server.types.files.FileCustomizableResponseTypegetLength in class io.micronaut.http.server.types.files.SystemFilepublic long getLastModified()
getLastModified in interface io.micronaut.http.server.types.files.FileCustomizableResponseTypegetLastModified in class io.micronaut.http.server.types.files.SystemFilepublic io.micronaut.http.MediaType getMediaType()
getMediaType in interface io.micronaut.http.server.types.files.FileCustomizableResponseTypegetMediaType in class io.micronaut.http.server.types.files.SystemFilepublic void process(io.micronaut.http.MutableHttpResponse response)
process in interface io.micronaut.http.server.types.CustomizableResponseTypeprocess in class io.micronaut.http.server.types.files.SystemFileresponse - The response to modifypublic void write(io.micronaut.http.HttpRequest<?> request,
io.micronaut.http.MutableHttpResponse<?> response,
io.netty.channel.ChannelHandlerContext context)
NettyCustomizableResponseTypewrite in interface NettyCustomizableResponseTyperequest - The requestresponse - The responsecontext - The Netty ChannelHandlerContext