docs(javadoc): release 2.0.0

This commit is contained in:
github-actions[bot]
2026-05-12 13:57:39 +00:00
parent e7fa1d8639
commit 515dceed7e
365 changed files with 56122 additions and 1 deletions
@@ -0,0 +1,411 @@
<!DOCTYPE HTML>
<html lang>
<head>
<!-- Generated by javadoc (21) on Tue May 12 13:57:37 UTC 2026 -->
<title>Response (flash-parent 2.0.0 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2026-05-12">
<meta name="description" content="declaration: package: dev.relism.flash.models, class: Response">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../script-dir/jquery-ui.min.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-3.7.1.min.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var pathtoroot = "../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Toggle navigation links"><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span></button>
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="class-use/Response.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html#class">Help</a></li>
</ul>
<ul class="sub-nav-list-small">
<li>
<p>Summary:</p>
<ul>
<li>Nested</li>
<li>Field</li>
<li><a href="#constructor-summary">Constr</a></li>
<li><a href="#method-summary">Method</a></li>
</ul>
</li>
<li>
<p>Detail:</p>
<ul>
<li>Field</li>
<li><a href="#constructor-detail">Constr</a></li>
<li><a href="#method-detail">Method</a></li>
</ul>
</li>
</ul>
</div>
<div class="sub-nav">
<div id="navbar-sub-list">
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><a href="../../../../search.html">SEARCH</a>
<input type="text" id="search-input" disabled placeholder="Search">
<input type="reset" id="reset-button" disabled value="reset">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">dev.relism.flash.models</a></div>
<h1 title="Class Response" class="title">Class Response</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a>
<div class="inheritance">dev.relism.flash.models.Response</div>
</div>
<section class="class-description" id="class-description">
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">Response</span>
<span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span></div>
<div class="block">HTTP response. All mutating methods return <code>this</code> for fluent chaining.
<pre><code>
// fixed body
return new Response(200, "ok", ContentType.TEXT_PLAIN);
// known-length stream → Content-Length header
return new Response(200, ContentType.BINARY).stream(Files.newInputStream(p), Files.size(p));
// unknown-length stream → Transfer-Encoding: chunked
return new Response(200, ContentType.TEXT_PLAIN).chunked(source);
</code></pre></div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(int,byte%5B%5D,dev.relism.flash.http.ContentType)" class="member-name-link">Response</a><wbr>(int&nbsp;statusCode,
byte[]&nbsp;body,
<a href="../http/ContentType.html" title="enum class in dev.relism.flash.http">ContentType</a>&nbsp;contentType)</code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(int,dev.relism.flash.http.ContentType)" class="member-name-link">Response</a><wbr>(int&nbsp;statusCode,
<a href="../http/ContentType.html" title="enum class in dev.relism.flash.http">ContentType</a>&nbsp;contentType)</code></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(int,java.lang.String,dev.relism.flash.http.ContentType)" class="member-name-link">Response</a><wbr>(int&nbsp;statusCode,
<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;text,
<a href="../http/ContentType.html" title="enum class in dev.relism.flash.http">ContentType</a>&nbsp;contentType)</code></div>
<div class="col-last even-row-color">&nbsp;</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel" aria-labelledby="method-summary-table-tab0">
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Response.html" title="class in dev.relism.flash.models">Response</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#body(byte%5B%5D)" class="member-name-link">body</a><wbr>(byte[]&nbsp;bytes)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Response.html" title="class in dev.relism.flash.models">Response</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#body(java.lang.String)" class="member-name-link">body</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;text)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Response.html" title="class in dev.relism.flash.models">Response</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#chunked(java.io.InputStream)" class="member-name-link">chunked</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/io/InputStream.html" title="class or interface in java.io" class="external-link">InputStream</a>&nbsp;is)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Streaming response with unknown length; written with <code>Transfer-Encoding: chunked</code>.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><wbr>&lt;byte[]&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getHeaders()" class="member-name-link">getHeaders</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns custom headers, or an empty list if none were added.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Response.html" title="class in dev.relism.flash.models">Response</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#header(byte%5B%5D)" class="member-name-link">header</a><wbr>(byte[]&nbsp;preEncoded)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Adds a pre-encoded header (e.g. a static <code>"X-RateLimit-Limit: 100\r\n"</code> byte array
pre-built at boot time).</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Response.html" title="class in dev.relism.flash.models">Response</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#header(java.lang.String,java.lang.String)" class="member-name-link">header</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;value)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Adds a response header.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isStreaming()" class="member-name-link">isStreaming</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Response.html" title="class in dev.relism.flash.models">Response</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#redirect(dev.relism.flash.http.HttpStatus,java.lang.String)" class="member-name-link">redirect</a><wbr>(<a href="../http/HttpStatus.html" title="enum class in dev.relism.flash.http">HttpStatus</a>&nbsp;status,
<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;url)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Redirect with an explicit 3xx status.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Response.html" title="class in dev.relism.flash.models">Response</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#redirect(java.lang.String)" class="member-name-link">redirect</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;url)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">302 Found redirect.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Response.html" title="class in dev.relism.flash.models">Response</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setBody(java.lang.Object)" class="member-name-link">setBody</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;body)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the body from a handler return value.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Response.html" title="class in dev.relism.flash.models">Response</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#status(int)" class="member-name-link">status</a><wbr>(int&nbsp;code)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the status code.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Response.html" title="class in dev.relism.flash.models">Response</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#status(dev.relism.flash.http.HttpStatus)" class="member-name-link">status</a><wbr>(<a href="../http/HttpStatus.html" title="enum class in dev.relism.flash.http">HttpStatus</a>&nbsp;status)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the status from an <a href="../http/HttpStatus.html" title="enum class in dev.relism.flash.http"><code>HttpStatus</code></a> constant.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Response.html" title="class in dev.relism.flash.models">Response</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#stream(java.io.InputStream,long)" class="member-name-link">stream</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/io/InputStream.html" title="class or interface in java.io" class="external-link">InputStream</a>&nbsp;is,
long&nbsp;length)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Streaming response with known length; written with <code>Content-Length</code>.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Response.html" title="class in dev.relism.flash.models">Response</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#type(dev.relism.flash.http.ContentType)" class="member-name-link">type</a><wbr>(<a href="../http/ContentType.html" title="enum class in dev.relism.flash.http">ContentType</a>&nbsp;ct)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Response.html" title="class in dev.relism.flash.models">Response</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#type(java.lang.String)" class="member-name-link">type</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;ct)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#writeHeaders(java.io.OutputStream)" class="member-name-link">writeHeaders</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a>&nbsp;out)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Writes pre-encoded custom headers directly to <code>out</code>.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;(int,dev.relism.flash.http.ContentType)">
<h3>Response</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">Response</span><wbr><span class="parameters">(int&nbsp;statusCode,
<a href="../http/ContentType.html" title="enum class in dev.relism.flash.http">ContentType</a>&nbsp;contentType)</span></div>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(int,byte[],dev.relism.flash.http.ContentType)">
<h3>Response</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">Response</span><wbr><span class="parameters">(int&nbsp;statusCode,
byte[]&nbsp;body,
<a href="../http/ContentType.html" title="enum class in dev.relism.flash.http">ContentType</a>&nbsp;contentType)</span></div>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(int,java.lang.String,dev.relism.flash.http.ContentType)">
<h3>Response</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">Response</span><wbr><span class="parameters">(int&nbsp;statusCode,
<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;text,
<a href="../http/ContentType.html" title="enum class in dev.relism.flash.http">ContentType</a>&nbsp;contentType)</span></div>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="status(int)">
<h3>status</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="Response.html" title="class in dev.relism.flash.models">Response</a></span>&nbsp;<span class="element-name">status</span><wbr><span class="parameters">(int&nbsp;code)</span></div>
<div class="block">Sets the status code. The phrase is looked up from <a href="../http/HttpStatus.html" title="enum class in dev.relism.flash.http"><code>HttpStatus</code></a> on the write path.</div>
</section>
</li>
<li>
<section class="detail" id="status(dev.relism.flash.http.HttpStatus)">
<h3>status</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="Response.html" title="class in dev.relism.flash.models">Response</a></span>&nbsp;<span class="element-name">status</span><wbr><span class="parameters">(<a href="../http/HttpStatus.html" title="enum class in dev.relism.flash.http">HttpStatus</a>&nbsp;status)</span></div>
<div class="block">Sets the status from an <a href="../http/HttpStatus.html" title="enum class in dev.relism.flash.http"><code>HttpStatus</code></a> constant. The pre-encoded bytes are used
directly on the write path — zero lookup, zero allocation.</div>
</section>
</li>
<li>
<section class="detail" id="type(dev.relism.flash.http.ContentType)">
<h3>type</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="Response.html" title="class in dev.relism.flash.models">Response</a></span>&nbsp;<span class="element-name">type</span><wbr><span class="parameters">(<a href="../http/ContentType.html" title="enum class in dev.relism.flash.http">ContentType</a>&nbsp;ct)</span></div>
</section>
</li>
<li>
<section class="detail" id="type(java.lang.String)">
<h3>type</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="Response.html" title="class in dev.relism.flash.models">Response</a></span>&nbsp;<span class="element-name">type</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;ct)</span></div>
</section>
</li>
<li>
<section class="detail" id="body(byte[])">
<h3>body</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="Response.html" title="class in dev.relism.flash.models">Response</a></span>&nbsp;<span class="element-name">body</span><wbr><span class="parameters">(byte[]&nbsp;bytes)</span></div>
</section>
</li>
<li>
<section class="detail" id="body(java.lang.String)">
<h3>body</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="Response.html" title="class in dev.relism.flash.models">Response</a></span>&nbsp;<span class="element-name">body</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;text)</span></div>
</section>
</li>
<li>
<section class="detail" id="stream(java.io.InputStream,long)">
<h3>stream</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="Response.html" title="class in dev.relism.flash.models">Response</a></span>&nbsp;<span class="element-name">stream</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/io/InputStream.html" title="class or interface in java.io" class="external-link">InputStream</a>&nbsp;is,
long&nbsp;length)</span></div>
<div class="block">Streaming response with known length; written with <code>Content-Length</code>.</div>
</section>
</li>
<li>
<section class="detail" id="chunked(java.io.InputStream)">
<h3>chunked</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="Response.html" title="class in dev.relism.flash.models">Response</a></span>&nbsp;<span class="element-name">chunked</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/io/InputStream.html" title="class or interface in java.io" class="external-link">InputStream</a>&nbsp;is)</span></div>
<div class="block">Streaming response with unknown length; written with <code>Transfer-Encoding: chunked</code>.</div>
</section>
</li>
<li>
<section class="detail" id="redirect(java.lang.String)">
<h3>redirect</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="Response.html" title="class in dev.relism.flash.models">Response</a></span>&nbsp;<span class="element-name">redirect</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;url)</span></div>
<div class="block">302 Found redirect. Clears the body, sets status and <code>Location</code> header.
Encoded once at call time; zero-alloc on the write path.
<pre><code>
return res.redirect("/login");
</code></pre></div>
</section>
</li>
<li>
<section class="detail" id="redirect(dev.relism.flash.http.HttpStatus,java.lang.String)">
<h3>redirect</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="Response.html" title="class in dev.relism.flash.models">Response</a></span>&nbsp;<span class="element-name">redirect</span><wbr><span class="parameters">(<a href="../http/HttpStatus.html" title="enum class in dev.relism.flash.http">HttpStatus</a>&nbsp;status,
<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;url)</span></div>
<div class="block">Redirect with an explicit 3xx status. Use <a href="../http/HttpStatus.html#MOVED_PERMANENTLY"><code>HttpStatus.MOVED_PERMANENTLY</code></a>,
<a href="../http/HttpStatus.html#TEMPORARY_REDIRECT"><code>HttpStatus.TEMPORARY_REDIRECT</code></a> (307), or <a href="../http/HttpStatus.html#PERMANENT_REDIRECT"><code>HttpStatus.PERMANENT_REDIRECT</code></a> (308)
when semantics matter.
<pre><code>
return res.redirect(HttpStatus.MOVED_PERMANENTLY, "/new-path");
</code></pre></div>
</section>
</li>
<li>
<section class="detail" id="header(java.lang.String,java.lang.String)">
<h3>header</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="Response.html" title="class in dev.relism.flash.models">Response</a></span>&nbsp;<span class="element-name">header</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;value)</span></div>
<div class="block">Adds a response header. Encoded once at call time; zero-alloc on the write path.</div>
</section>
</li>
<li>
<section class="detail" id="header(byte[])">
<h3>header</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="Response.html" title="class in dev.relism.flash.models">Response</a></span>&nbsp;<span class="element-name">header</span><wbr><span class="parameters">(byte[]&nbsp;preEncoded)</span></div>
<div class="block">Adds a pre-encoded header (e.g. a static <code>"X-RateLimit-Limit: 100\r\n"</code> byte array
pre-built at boot time). Zero-alloc on both the call path and the write path.</div>
</section>
</li>
<li>
<section class="detail" id="isStreaming()">
<h3>isStreaming</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isStreaming</span>()</div>
</section>
</li>
<li>
<section class="detail" id="setBody(java.lang.Object)">
<h3>setBody</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="Response.html" title="class in dev.relism.flash.models">Response</a></span>&nbsp;<span class="element-name">setBody</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;body)</span></div>
<div class="block">Sets the body from a handler return value. Accepted types: <code>byte[]</code>,
<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link"><code>String</code></a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link"><code>CharSequence</code></a>. Any other non-null type throws
<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link"><code>IllegalArgumentException</code></a> — return a <code>Response</code> directly, or
serialize to <code>String</code>/<code>byte[]</code> before returning.</div>
</section>
</li>
<li>
<section class="detail" id="getHeaders()">
<h3>getHeaders</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;byte[]&gt;</span>&nbsp;<span class="element-name">getHeaders</span>()</div>
<div class="block">Returns custom headers, or an empty list if none were added.</div>
</section>
</li>
<li>
<section class="detail" id="writeHeaders(java.io.OutputStream)">
<h3>writeHeaders</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">writeHeaders</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a>&nbsp;out)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div>
<div class="block">Writes pre-encoded custom headers directly to <code>out</code>. Zero-alloc when no headers are set.</div>
<dl class="notes">
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code></dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &#169; 2026. All rights reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>