blob: 2f9af4f3f4f10c0053f2cd8d9886f1109ff61930 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>EntityPart</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<link rel="shortcut icon" href="/img/jakarta-favicon.ico">
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="EntityPart";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":17,"i8":17};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],16:["t5","Default Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../jakarta/ws/rs/core/Cookie.Builder.html" title="class in jakarta.ws.rs.core"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../jakarta/ws/rs/core/EntityPart.Builder.html" title="interface in jakarta.ws.rs.core"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?jakarta/ws/rs/core/EntityPart.html" target="_top">Frames</a></li>
<li><a href="EntityPart.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">jakarta.ws.rs.core</div>
<h2 title="Interface EntityPart" class="title">Interface EntityPart</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public interface <span class="typeNameLabel">EntityPart</span></pre>
<div class="block">A <code>EntityPart</code> is one part of a multipart entity. As defined in
<a href="https://tools.ietf.org/html/rfc7578">RFC 7578</a>, a multipart
request or response must have a content type of "multipart/form-data" with a
<code>boundary</code> parameter indicating where one part ends the next may begin.
<p>
Multipart entities may be received in a resource method as a collection of
parts (e.g. <code>List&lt;EntityPart&gt;</code>) or as a form parameter (ex:
<code>@FormParam("part1Name") EntityPart part1</code>).
</p>
<p>
Likewise, a client may receive a multipart response by reading the returned
entity as a collection of EntityParts (ex: <code>response.readEntity(new
GenericType&lt;List&lt;EntityPart&gt;&gt;() {})</code>).
</p>
<p>
In order to send a multipart entity either as a client request or a response
from a resource method, you may create the Lists using
<code>EntityPart.Builder</code>. For example:
</p>
<pre>
Client c = ClientBuilder.newClient();
WebTarget target = c.target(someURL);
List&lt;EntityPart&gt; parts = Arrays.asList(
EntityPart.withName("name1").fileName("file1.doc").content(stream1).build(),
EntityPart.withName("name2").fileName("file2.doc").content(stream2).build(),
EntityPart.withName("name3").fileName("file3.xml").content(myObject, MyClass.class).mediaType("application/xml").build());
GenericEntity&lt;List&lt;EntityPart&gt;&gt; genericEntity = new GenericEntity&lt;&gt;(parts){};
Entity entity = Entity.entity(genericEntity, MediaType.MULTIPART_FORM_DATA);
Response r = target.request().post(entity);
</pre>
Note that when building a EntityPart, the name and content are required.
Other properties such as headers, file name, and media type are optional.
It is the responsibility of the implementation code to close the content
input streams when sending the multipart content. Closing the stream before
the implementation has sent it could result in unexpected exceptions. It is
the responsibility of the calling code to close the stream when receiving the
multipart content.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>3.1</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Interface and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/EntityPart.Builder.html" title="interface in jakarta.ws.rs.core">EntityPart.Builder</a></span></code>
<div class="block">Builder for <a href="../../../../jakarta/ws/rs/core/EntityPart.html" title="interface in jakarta.ws.rs.core"><code>EntityPart</code></a> instances.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t5" class="tableTab"><span><a href="javascript:show(16);">Default Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>java.io.InputStream</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/EntityPart.html#getContent--">getContent</a></span>()</code>
<div class="block">Returns the input stream for this part.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;T</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/EntityPart.html#getContent-java.lang.Class-">getContent</a></span>(java.lang.Class&lt;T&gt;&nbsp;type)</code>
<div class="block">Converts the content stream for this part to the specified class and returns
it.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;T</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/EntityPart.html#getContent-jakarta.ws.rs.core.GenericType-">getContent</a></span>(<a href="../../../../jakarta/ws/rs/core/GenericType.html" title="class in jakarta.ws.rs.core">GenericType</a>&lt;T&gt;&nbsp;type)</code>
<div class="block">Converts the content stream for this part to the specified type and returns
it.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>java.util.Optional&lt;java.lang.String&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/EntityPart.html#getFileName--">getFileName</a></span>()</code>
<div class="block">Returns the filename of this part.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../../jakarta/ws/rs/core/MultivaluedMap.html" title="interface in jakarta.ws.rs.core">MultivaluedMap</a>&lt;java.lang.String,java.lang.String&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/EntityPart.html#getHeaders--">getHeaders</a></span>()</code>
<div class="block">Returns an immutable multivalued map of headers for this specific part.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="../../../../jakarta/ws/rs/core/MediaType.html" title="class in jakarta.ws.rs.core">MediaType</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/EntityPart.html#getMediaType--">getMediaType</a></span>()</code>
<div class="block">Returns the content type of this part, and equivalent to calling
<code>MediaType.valueOf(part.getHeaders().getFirst(HttpHeaders.CONTENT_TYPE))</code>.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/EntityPart.html#getName--">getName</a></span>()</code>
<div class="block">Returns the name of this part within the multipart entity.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../jakarta/ws/rs/core/EntityPart.Builder.html" title="interface in jakarta.ws.rs.core">EntityPart.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/EntityPart.html#withFileName-java.lang.String-">withFileName</a></span>(java.lang.String&nbsp;partAndFileName)</code>
<div class="block">Creates a new <code>EntityPart.Builder</code> instance that sets the part
<code>name</code> and <code>fileName</code> to the passed in <code>partAndFileName</code>
value.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static <a href="../../../../jakarta/ws/rs/core/EntityPart.Builder.html" title="interface in jakarta.ws.rs.core">EntityPart.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/EntityPart.html#withName-java.lang.String-">withName</a></span>(java.lang.String&nbsp;partName)</code>
<div class="block">Creates a new <code>EntityPart.Builder</code> instance.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="withName-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withName</h4>
<pre>static&nbsp;<a href="../../../../jakarta/ws/rs/core/EntityPart.Builder.html" title="interface in jakarta.ws.rs.core">EntityPart.Builder</a>&nbsp;withName(java.lang.String&nbsp;partName)</pre>
<div class="block">Creates a new <code>EntityPart.Builder</code> instance.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>partName</code> - name of the part to create within the multipart entity</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="../../../../jakarta/ws/rs/core/EntityPart.Builder.html" title="interface in jakarta.ws.rs.core"><code>EntityPart.Builder</code></a> for building new <a href="../../../../jakarta/ws/rs/core/EntityPart.html" title="interface in jakarta.ws.rs.core"><code>EntityPart</code></a> instances</dd>
</dl>
</li>
</ul>
<a name="withFileName-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withFileName</h4>
<pre>static&nbsp;<a href="../../../../jakarta/ws/rs/core/EntityPart.Builder.html" title="interface in jakarta.ws.rs.core">EntityPart.Builder</a>&nbsp;withFileName(java.lang.String&nbsp;partAndFileName)</pre>
<div class="block">Creates a new <code>EntityPart.Builder</code> instance that sets the part
<code>name</code> and <code>fileName</code> to the passed in <code>partAndFileName</code>
value.
<p>
Logically, this is the same as <code>EntityPart.withName(x).fileName(x)</code>.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>partAndFileName</code> - name and filename of the part to create within the
multipart entity</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="../../../../jakarta/ws/rs/core/EntityPart.Builder.html" title="interface in jakarta.ws.rs.core"><code>EntityPart.Builder</code></a> for building new <a href="../../../../jakarta/ws/rs/core/EntityPart.html" title="interface in jakarta.ws.rs.core"><code>EntityPart</code></a> instances</dd>
</dl>
</li>
</ul>
<a name="getName--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getName</h4>
<pre>java.lang.String&nbsp;getName()</pre>
<div class="block">Returns the name of this part within the multipart entity. This will be the
"name" attribute of the <code>Content-Disposition</code> header for this part.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the part name</dd>
</dl>
</li>
</ul>
<a name="getFileName--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFileName</h4>
<pre>java.util.Optional&lt;java.lang.String&gt;&nbsp;getFileName()</pre>
<div class="block">Returns the filename of this part. This will be the "filename" attribute of
the <code>Content-Disposition</code> header for this part. A filename is not
required in a part, so if a filename is not present it will return
<code>Optional.empty()</code>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an <code>Optional&lt;String&gt;</code> indicating the filename if present</dd>
</dl>
</li>
</ul>
<a name="getContent--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getContent</h4>
<pre>java.io.InputStream&nbsp;getContent()</pre>
<div class="block">Returns the input stream for this part. This is the content body of the part
and is accessed as a stream to avoid loading potentially large amounts of
data into the heap.
It is the responsibility of the calling code to close this stream after
receiving it.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an <code>InputStream</code> representing the content of this part</dd>
</dl>
</li>
</ul>
<a name="getContent-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getContent</h4>
<pre>&lt;T&gt;&nbsp;T&nbsp;getContent(java.lang.Class&lt;T&gt;&nbsp;type)
throws java.lang.IllegalArgumentException,
java.lang.IllegalStateException,
java.io.IOException,
<a href="../../../../jakarta/ws/rs/WebApplicationException.html" title="class in jakarta.ws.rs">WebApplicationException</a></pre>
<div class="block">Converts the content stream for this part to the specified class and returns
it. The implementation must convert the stream by finding a
<a href="../../../../jakarta/ws/rs/ext/MessageBodyReader.html" title="interface in jakarta.ws.rs.ext"><code>MessageBodyReader</code></a> that handles the specified type
as well as the <a href="../../../../jakarta/ws/rs/core/MediaType.html" title="class in jakarta.ws.rs.core"><code>MediaType</code></a> of the part. If no
<a href="../../../../jakarta/ws/rs/ext/MessageBodyReader.html" title="interface in jakarta.ws.rs.ext"><code>MessageBodyReader</code></a> can be found to perform the
conversion, this method will throw an <code>IllegalArgumentException</code>.
The implementation is required to close the content stream when this method
is invoked, so it may only be invoked once. Subsequent invocations will
result in an <code>IllegalStateException</code>. Likewise this method will throw
an <code>IllegalStateException</code> if it is called after calling
<a href="../../../../jakarta/ws/rs/core/EntityPart.html#getContent--"><code>getContent()</code></a> or <a href="../../../../jakarta/ws/rs/core/EntityPart.html#getContent-jakarta.ws.rs.core.GenericType-"><code>getContent(GenericType)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the entity type</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type</code> - the <code>Class</code> that the implementation should convert this
part to</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an instance of the specified <code>Class</code> representing the content
of this part</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if no
<a href="../../../../jakarta/ws/rs/ext/MessageBodyReader.html" title="interface in jakarta.ws.rs.ext"><code>MessageBodyReader</code></a>
can handle the conversion of this part to
the specified type</dd>
<dd><code>java.lang.IllegalStateException</code> - if this method or any of the other
<code>getContent</code> methods has already been
invoked</dd>
<dd><code>java.io.IOException</code> - if the
<a href="../../../../jakarta/ws/rs/ext/MessageBodyReader.html#readFrom-java.lang.Class-java.lang.reflect.Type-java.lang.annotation.Annotation:A-jakarta.ws.rs.core.MediaType-jakarta.ws.rs.core.MultivaluedMap-java.io.InputStream-"><code>MessageBodyReader.readFrom(Class,
java.lang.reflect.Type, java.lang.annotation.Annotation[], MediaType, MultivaluedMap, InputStream)</code></a>
method throws an <code>IOException</code></dd>
<dd><code><a href="../../../../jakarta/ws/rs/WebApplicationException.html" title="class in jakarta.ws.rs">WebApplicationException</a></code> - if the
<a href="../../../../jakarta/ws/rs/ext/MessageBodyReader.html#readFrom-java.lang.Class-java.lang.reflect.Type-java.lang.annotation.Annotation:A-jakarta.ws.rs.core.MediaType-jakarta.ws.rs.core.MultivaluedMap-java.io.InputStream-"><code>MessageBodyReader.readFrom(Class,
java.lang.reflect.Type, java.lang.annotation.Annotation[], MediaType, MultivaluedMap, InputStream)</code></a>
method throws an
<code>WebApplicationException</code></dd>
</dl>
</li>
</ul>
<a name="getContent-jakarta.ws.rs.core.GenericType-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getContent</h4>
<pre>&lt;T&gt;&nbsp;T&nbsp;getContent(<a href="../../../../jakarta/ws/rs/core/GenericType.html" title="class in jakarta.ws.rs.core">GenericType</a>&lt;T&gt;&nbsp;type)
throws java.lang.IllegalArgumentException,
java.lang.IllegalStateException,
java.io.IOException,
<a href="../../../../jakarta/ws/rs/WebApplicationException.html" title="class in jakarta.ws.rs">WebApplicationException</a></pre>
<div class="block">Converts the content stream for this part to the specified type and returns
it. The implementation must convert the stream by finding a
<a href="../../../../jakarta/ws/rs/ext/MessageBodyReader.html" title="interface in jakarta.ws.rs.ext"><code>MessageBodyReader</code></a> that handles the specified type
as well as the <a href="../../../../jakarta/ws/rs/core/MediaType.html" title="class in jakarta.ws.rs.core"><code>MediaType</code></a> of the part. If no
<a href="../../../../jakarta/ws/rs/ext/MessageBodyReader.html" title="interface in jakarta.ws.rs.ext"><code>MessageBodyReader</code></a> can be found to perform the
conversion, this method will throw an <code>IllegalArgumentException</code>.
The implementation is required to close the content stream when this method
is invoked, so it may only be invoked once. Subsequent invocations will
result in an <code>IllegalStateException</code>. Likewise this method will throw
an <code>IllegalStateException</code> if it is called after calling
<a href="../../../../jakarta/ws/rs/core/EntityPart.html#getContent--"><code>getContent()</code></a> or <a href="../../../../jakarta/ws/rs/core/EntityPart.html#getContent-java.lang.Class-"><code>getContent(Class)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the entity type</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type</code> - the generic type that the implementation should convert this part
to</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an instance of the specified generic type representing the content of
this part</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if no
<a href="../../../../jakarta/ws/rs/ext/MessageBodyReader.html" title="interface in jakarta.ws.rs.ext"><code>MessageBodyReader</code></a>
can handle the conversion of this part to
the specified type</dd>
<dd><code>java.lang.IllegalStateException</code> - if this method or any of the other
<code>getContent</code> methods has already been
invoked</dd>
<dd><code>java.io.IOException</code> - if the
<a href="../../../../jakarta/ws/rs/ext/MessageBodyReader.html#readFrom-java.lang.Class-java.lang.reflect.Type-java.lang.annotation.Annotation:A-jakarta.ws.rs.core.MediaType-jakarta.ws.rs.core.MultivaluedMap-java.io.InputStream-"><code>MessageBodyReader.readFrom(Class,
java.lang.reflect.Type, java.lang.annotation.Annotation[], MediaType, MultivaluedMap, InputStream)</code></a>
method throws an <code>IOException</code></dd>
<dd><code><a href="../../../../jakarta/ws/rs/WebApplicationException.html" title="class in jakarta.ws.rs">WebApplicationException</a></code> - if the
<a href="../../../../jakarta/ws/rs/ext/MessageBodyReader.html#readFrom-java.lang.Class-java.lang.reflect.Type-java.lang.annotation.Annotation:A-jakarta.ws.rs.core.MediaType-jakarta.ws.rs.core.MultivaluedMap-java.io.InputStream-"><code>MessageBodyReader.readFrom(Class,
java.lang.reflect.Type, java.lang.annotation.Annotation[], MediaType, MultivaluedMap, InputStream)</code></a>
method throws an
<code>WebApplicationException</code></dd>
</dl>
</li>
</ul>
<a name="getHeaders--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHeaders</h4>
<pre><a href="../../../../jakarta/ws/rs/core/MultivaluedMap.html" title="interface in jakarta.ws.rs.core">MultivaluedMap</a>&lt;java.lang.String,java.lang.String&gt;&nbsp;getHeaders()</pre>
<div class="block">Returns an immutable multivalued map of headers for this specific part.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>immutable <code>MultivaluedMap&lt;String, String&gt;</code> of part headers</dd>
</dl>
</li>
</ul>
<a name="getMediaType--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getMediaType</h4>
<pre><a href="../../../../jakarta/ws/rs/core/MediaType.html" title="class in jakarta.ws.rs.core">MediaType</a>&nbsp;getMediaType()</pre>
<div class="block">Returns the content type of this part, and equivalent to calling
<code>MediaType.valueOf(part.getHeaders().getFirst(HttpHeaders.CONTENT_TYPE))</code>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the media type for this part</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../jakarta/ws/rs/core/Cookie.Builder.html" title="class in jakarta.ws.rs.core"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../jakarta/ws/rs/core/EntityPart.Builder.html" title="interface in jakarta.ws.rs.core"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?jakarta/ws/rs/core/EntityPart.html" target="_top">Frames</a></li>
<li><a href="EntityPart.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>