spring-framework / org.springframework.web.reactive.resource / TransformedResource

TransformedResource

open class TransformedResource : ByteArrayResource

An extension of ByteArrayResource that a ResourceTransformer can use to represent an original resource preserving all other information except the content.

Author
Rossen Stoyanchev

Since
5.0

Constructors

<init>

TransformedResource(original: Resource, transformedContent: ByteArray)

Functions

getFilename

open fun getFilename(): String

lastModified

open fun lastModified(): Long

Inherited Functions

contentLength

open fun contentLength(): Long

This implementation returns the length of the underlying byte array.

equals

open fun equals(other: Any?): Boolean

This implementation compares the underlying byte array.

exists

open fun exists(): Boolean

This implementation always returns true.

getByteArray

fun getByteArray(): ByteArray

Return the underlying byte array.

getDescription

open fun getDescription(): String

This implementation returns a description that includes the passed-in description, if any.

getInputStream

open fun getInputStream(): InputStream

This implementation returns a ByteArrayInputStream for the underlying byte array.

hashCode

open fun hashCode(): Int

This implementation returns the hash code based on the underlying byte array.