ktor-server-core / io.ktor.http.content / JarFileContent

JarFileContent

class JarFileContent : ReadChannelContent

Represents an OutgoingContent for a resource inside a Jar file

Parameters

jarFile - is an instance of File representing a Jar

resourcePath - is an instance of a resource inside a Jar file

Constructors

<init>

JarFileContent(zipFilePath: Path, resourcePath: String, contentType: ContentType)JarFileContent(jarFile: File, resourcePath: String, contentType: ContentType)

Represents an OutgoingContent for a resource inside a Jar file

Properties

contentLength

val contentLength: Long?

contentType

val contentType: ContentType

isFile

val isFile: Boolean

jarFile

val jarFile: File

is an instance of File representing a Jar

resourcePath

val resourcePath: String

is an instance of a resource inside a Jar file

Functions

readFrom

fun readFrom(): ByteReadChannel

Extension Properties

defaultVersions

val OutgoingContent.defaultVersions: List<Version>

Retrieves LastModified and ETag versions from this OutgoingContent headers