spring-framework / org.springframework.mock.web / MockBodyContent

MockBodyContent

open class MockBodyContent : BodyContent

Mock implementation of the javax.servlet.jsp.tagext.BodyContent class. Only necessary for testing applications when testing custom JSP tags.

Author
Juergen Hoeller

Since
2.5

Constructors

<init>

MockBodyContent(content: String, response: HttpServletResponse)
MockBodyContent(content: String, targetWriter: Writer)
MockBodyContent(content: String, response: HttpServletResponse, targetWriter: Writer)

Create a MockBodyContent for the given response.

Functions

clear

open fun clear(): Unit

clearBuffer

open fun clearBuffer(): Unit

close

open fun close(): Unit

getReader

open fun getReader(): Reader

getRemaining

open fun getRemaining(): Int

getString

open fun getString(): String

newLine

open fun newLine(): Unit

print

open fun print(value: Boolean): Unit
open fun print(value: Char): Unit
open fun print(value: CharArray): Unit
open fun print(value: Double): Unit
open fun print(value: Float): Unit
open fun print(value: Int): Unit
open fun print(value: Long): Unit
open fun print(value: Any): Unit
open fun print(value: String): Unit

println

open fun println(): Unit
open fun println(value: Boolean): Unit
open fun println(value: Char): Unit
open fun println(value: CharArray): Unit
open fun println(value: Double): Unit
open fun println(value: Float): Unit
open fun println(value: Int): Unit
open fun println(value: Long): Unit
open fun println(value: Any): Unit
open fun println(value: String): Unit

write

open fun write(value: CharArray, offset: Int, length: Int): Unit

writeOut

open fun writeOut(writer: Writer): Unit