blob: ff94543edae17a2d2029df14d1dc9fc3900fa86e [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>
<!-- Generated by javadoc (1.8.0_121) on Fri Mar 31 15:41:38 CEST 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ContentStreamUtils (Apache Chemistry OpenCMIS 1.1.0)</title>
<meta name="date" content="2017-03-31">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ContentStreamUtils (Apache Chemistry OpenCMIS 1.1.0)";
}
}
catch(err) {
}
//-->
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete 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="class-use/ContentStreamUtils.html">Use</a></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>Prev&nbsp;Class</li>
<li><a href="../../../../../../org/apache/chemistry/opencmis/client/util/ContentStreamUtils.AutoCloseInputStream.html" title="class in org.apache.chemistry.opencmis.client.util"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/chemistry/opencmis/client/util/ContentStreamUtils.html" target="_top">Frames</a></li>
<li><a href="ContentStreamUtils.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">org.apache.chemistry.opencmis.client.util</div>
<h2 title="Class ContentStreamUtils" class="title">Class ContentStreamUtils</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.chemistry.opencmis.client.util.ContentStreamUtils</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public final class <span class="typeNameLabel">ContentStreamUtils</span>
extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">Methods to create <a href="../../../../../../org/apache/chemistry/opencmis/commons/data/ContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data"><code>ContentStream</code></a> objects.</div>
</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">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/chemistry/opencmis/client/util/ContentStreamUtils.AutoCloseInputStream.html" title="class in org.apache.chemistry.opencmis.client.util">ContentStreamUtils.AutoCloseInputStream</a></span></code>
<div class="block">InputStream that gets closed when the end of the stream is reached or the
underlying stream throws an exception.</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="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete 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>static <a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data">MutableContentStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/chemistry/opencmis/client/util/ContentStreamUtils.html#createByteArrayContentStream-java.lang.String-byte:A-">createByteArrayContentStream</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;filename,
byte[]&nbsp;contentBytes)</code>
<div class="block">Creates a content stream object from a byte array.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data">MutableContentStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/chemistry/opencmis/client/util/ContentStreamUtils.html#createByteArrayContentStream-java.lang.String-byte:A-int-int-java.lang.String-">createByteArrayContentStream</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;filename,
byte[]&nbsp;contentBytes,
int&nbsp;offset,
int&nbsp;length,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;mimetype)</code>
<div class="block">Creates a content stream object from a byte array.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data">MutableContentStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/chemistry/opencmis/client/util/ContentStreamUtils.html#createByteArrayContentStream-java.lang.String-byte:A-java.lang.String-">createByteArrayContentStream</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;filename,
byte[]&nbsp;contentBytes,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;mimetype)</code>
<div class="block">Creates a content stream object from a byte array.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data">MutableContentStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/chemistry/opencmis/client/util/ContentStreamUtils.html#createContentStream-java.lang.String-java.math.BigInteger-java.lang.String-java.io.InputStream-">createContentStream</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;filename,
<a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a>&nbsp;length,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;mimetype,
<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;stream)</code>
<div class="block">Creates a content stream object for an InputStream.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data">MutableContentStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/chemistry/opencmis/client/util/ContentStreamUtils.html#createContentStream-java.lang.String-long-java.lang.String-java.io.InputStream-">createContentStream</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;filename,
long&nbsp;length,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;mimetype,
<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;stream)</code>
<div class="block">Creates a content stream object for an InputStream.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data">MutableContentStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/chemistry/opencmis/client/util/ContentStreamUtils.html#createFileContentStream-java.io.File-">createFileContentStream</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)</code>
<div class="block">Creates a content stream object from file.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data">MutableContentStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/chemistry/opencmis/client/util/ContentStreamUtils.html#createFileContentStream-java.io.File-java.lang.String-">createFileContentStream</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;mimetype)</code>
<div class="block">Creates a content stream object from file.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data">MutableContentStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/chemistry/opencmis/client/util/ContentStreamUtils.html#createFileContentStream-java.lang.String-java.io.File-">createFileContentStream</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;filename,
<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)</code>
<div class="block">Creates a content stream object from file.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data">MutableContentStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/chemistry/opencmis/client/util/ContentStreamUtils.html#createFileContentStream-java.lang.String-java.io.File-java.lang.String-">createFileContentStream</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;filename,
<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;mimetype)</code>
<div class="block">Creates a content stream object from file.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data">MutableContentStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/chemistry/opencmis/client/util/ContentStreamUtils.html#createTextContentStream-java.lang.String-java.lang.String-">createTextContentStream</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;filename,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;content)</code>
<div class="block">Creates a content stream object from a string.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data">MutableContentStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/chemistry/opencmis/client/util/ContentStreamUtils.html#createTextContentStream-java.lang.String-java.lang.String-java.lang.String-">createTextContentStream</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;filename,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;content,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;mimetype)</code>
<div class="block">Creates a content stream object from a string.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/chemistry/opencmis/client/util/ContentStreamUtils.html#writeContentStreamToFile-org.apache.chemistry.opencmis.commons.data.ContentStream-java.io.File-">writeContentStreamToFile</a></span>(<a href="../../../../../../org/apache/chemistry/opencmis/commons/data/ContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data">ContentStream</a>&nbsp;contentStream,
<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)</code>
<div class="block">Writes a content stream to a file.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/chemistry/opencmis/client/util/ContentStreamUtils.html#writeContentStreamToOutputStream-org.apache.chemistry.opencmis.commons.data.ContentStream-java.io.OutputStream-">writeContentStreamToOutputStream</a></span>(<a href="../../../../../../org/apache/chemistry/opencmis/commons/data/ContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data">ContentStream</a>&nbsp;contentStream,
<a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;outputStream)</code>
<div class="block">Writes a content stream to an output stream.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</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="createContentStream-java.lang.String-long-java.lang.String-java.io.InputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createContentStream</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data">MutableContentStream</a>&nbsp;createContentStream(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;filename,
long&nbsp;length,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;mimetype,
<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;stream)</pre>
<div class="block">Creates a content stream object for an InputStream.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>filename</code> - name of the content stream</dd>
<dd><code>length</code> - length of the stream in bytes</dd>
<dd><code>mimetype</code> - content MIME type</dd>
<dd><code>stream</code> - the InputStream</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data"><code>MutableContentStream</code></a> object</dd>
</dl>
</li>
</ul>
<a name="createContentStream-java.lang.String-java.math.BigInteger-java.lang.String-java.io.InputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createContentStream</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data">MutableContentStream</a>&nbsp;createContentStream(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;filename,
<a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a>&nbsp;length,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;mimetype,
<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;stream)</pre>
<div class="block">Creates a content stream object for an InputStream.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>filename</code> - name of the content stream</dd>
<dd><code>length</code> - length of the stream in bytes</dd>
<dd><code>mimetype</code> - content MIME type</dd>
<dd><code>stream</code> - the InputStream</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data"><code>MutableContentStream</code></a> object</dd>
</dl>
</li>
</ul>
<a name="createByteArrayContentStream-java.lang.String-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createByteArrayContentStream</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data">MutableContentStream</a>&nbsp;createByteArrayContentStream(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;filename,
byte[]&nbsp;contentBytes)</pre>
<div class="block">Creates a content stream object from a byte array.
The MIME type is set to "application/octet-stream".</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>filename</code> - name of the content stream</dd>
<dd><code>contentBytes</code> - content bytes</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data"><code>MutableContentStream</code></a> object</dd>
</dl>
</li>
</ul>
<a name="createByteArrayContentStream-java.lang.String-byte:A-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createByteArrayContentStream</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data">MutableContentStream</a>&nbsp;createByteArrayContentStream(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;filename,
byte[]&nbsp;contentBytes,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;mimetype)</pre>
<div class="block">Creates a content stream object from a byte array.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>filename</code> - name of the content stream</dd>
<dd><code>contentBytes</code> - the content bytes</dd>
<dd><code>mimetype</code> - content MIME type</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data"><code>MutableContentStream</code></a> object</dd>
</dl>
</li>
</ul>
<a name="createByteArrayContentStream-java.lang.String-byte:A-int-int-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createByteArrayContentStream</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data">MutableContentStream</a>&nbsp;createByteArrayContentStream(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;filename,
byte[]&nbsp;contentBytes,
int&nbsp;offset,
int&nbsp;length,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;mimetype)</pre>
<div class="block">Creates a content stream object from a byte array.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>filename</code> - name of the content stream</dd>
<dd><code>contentBytes</code> - the content bytes</dd>
<dd><code>offset</code> - the offset in the content bytes</dd>
<dd><code>length</code> - the maximum number of bytes to read from the content bytes</dd>
<dd><code>mimetype</code> - content MIME type</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data"><code>MutableContentStream</code></a> object</dd>
</dl>
</li>
</ul>
<a name="createTextContentStream-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createTextContentStream</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data">MutableContentStream</a>&nbsp;createTextContentStream(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;filename,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;content)</pre>
<div class="block">Creates a content stream object from a string.
The MIME type is set to "text/plain".</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>filename</code> - name of the content stream</dd>
<dd><code>content</code> - the content string</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data"><code>MutableContentStream</code></a> object</dd>
</dl>
</li>
</ul>
<a name="createTextContentStream-java.lang.String-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createTextContentStream</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data">MutableContentStream</a>&nbsp;createTextContentStream(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;filename,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;content,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;mimetype)</pre>
<div class="block">Creates a content stream object from a string.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>filename</code> - name of the content stream</dd>
<dd><code>content</code> - the content string</dd>
<dd><code>mimetype</code> - content MIME type</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data"><code>MutableContentStream</code></a> object</dd>
</dl>
</li>
</ul>
<a name="createFileContentStream-java.io.File-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createFileContentStream</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data">MutableContentStream</a>&nbsp;createFileContentStream(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileNotFoundException.html?is-external=true" title="class or interface in java.io">FileNotFoundException</a></pre>
<div class="block">Creates a content stream object from file.
The MIME type is guessed from the file name and the content.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>file</code> - the file</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data"><code>MutableContentStream</code></a> object</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileNotFoundException.html?is-external=true" title="class or interface in java.io">FileNotFoundException</a></code></dd>
</dl>
</li>
</ul>
<a name="createFileContentStream-java.lang.String-java.io.File-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createFileContentStream</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data">MutableContentStream</a>&nbsp;createFileContentStream(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;filename,
<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileNotFoundException.html?is-external=true" title="class or interface in java.io">FileNotFoundException</a></pre>
<div class="block">Creates a content stream object from file.
The MIME type is guessed from the file name and the content.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>filename</code> - name of the content stream</dd>
<dd><code>file</code> - the file</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data"><code>MutableContentStream</code></a> object</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileNotFoundException.html?is-external=true" title="class or interface in java.io">FileNotFoundException</a></code></dd>
</dl>
</li>
</ul>
<a name="createFileContentStream-java.io.File-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createFileContentStream</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data">MutableContentStream</a>&nbsp;createFileContentStream(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;mimetype)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileNotFoundException.html?is-external=true" title="class or interface in java.io">FileNotFoundException</a></pre>
<div class="block">Creates a content stream object from file.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>file</code> - the file</dd>
<dd><code>mimetype</code> - content MIME type</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data"><code>MutableContentStream</code></a> object</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileNotFoundException.html?is-external=true" title="class or interface in java.io">FileNotFoundException</a></code></dd>
</dl>
</li>
</ul>
<a name="createFileContentStream-java.lang.String-java.io.File-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createFileContentStream</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data">MutableContentStream</a>&nbsp;createFileContentStream(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;filename,
<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;mimetype)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileNotFoundException.html?is-external=true" title="class or interface in java.io">FileNotFoundException</a></pre>
<div class="block">Creates a content stream object from file.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>filename</code> - name of the content stream</dd>
<dd><code>file</code> - the file</dd>
<dd><code>mimetype</code> - content MIME type</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <a href="../../../../../../org/apache/chemistry/opencmis/commons/data/MutableContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data"><code>MutableContentStream</code></a> object</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileNotFoundException.html?is-external=true" title="class or interface in java.io">FileNotFoundException</a></code></dd>
</dl>
</li>
</ul>
<a name="writeContentStreamToOutputStream-org.apache.chemistry.opencmis.commons.data.ContentStream-java.io.OutputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeContentStreamToOutputStream</h4>
<pre>public static&nbsp;void&nbsp;writeContentStreamToOutputStream(<a href="../../../../../../org/apache/chemistry/opencmis/commons/data/ContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data">ContentStream</a>&nbsp;contentStream,
<a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;outputStream)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Writes a content stream to an output stream.
If the content stream is <code>null</code> or the stream itself is
<code>null</code>, nothing is written to the output stream. The content stream
is closed at the end. The output stream remains open.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>contentStream</code> - the content stream, may be <code>null</code></dd>
<dd><code>outputStream</code> - the output stream, not <code>null</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
<a name="writeContentStreamToFile-org.apache.chemistry.opencmis.commons.data.ContentStream-java.io.File-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>writeContentStreamToFile</h4>
<pre>public static&nbsp;void&nbsp;writeContentStreamToFile(<a href="../../../../../../org/apache/chemistry/opencmis/commons/data/ContentStream.html" title="interface in org.apache.chemistry.opencmis.commons.data">ContentStream</a>&nbsp;contentStream,
<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Writes a content stream to a file.
If the content stream is <code>null</code> or the stream itself is
<code>null</code>, the file is empty. The content stream and the file are
closed at the end.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>contentStream</code> - the content stream, may be <code>null</code></dd>
<dd><code>file</code> - the file, not <code>null</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></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="class-use/ContentStreamUtils.html">Use</a></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>Prev&nbsp;Class</li>
<li><a href="../../../../../../org/apache/chemistry/opencmis/client/util/ContentStreamUtils.AutoCloseInputStream.html" title="class in org.apache.chemistry.opencmis.client.util"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/chemistry/opencmis/client/util/ContentStreamUtils.html" target="_top">Frames</a></li>
<li><a href="ContentStreamUtils.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 ======= -->
<p class="legalCopy"><small>Copyright &#169; 2009&#x2013;2017 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>