blob: 3c799f6c0250a069702c7c0577881e39ab67c219 [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_112) on Mon Oct 14 11:36:19 MSK 2019 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>MemoryBlob (cayenne-doc: Cayenne Documentation 4.0.2 API)</title>
<meta name="date" content="2019-10-14">
<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="MemoryBlob (cayenne-doc: Cayenne Documentation 4.0.2 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance 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/MemoryBlob.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><a href="../../../../org/apache/cayenne/util/LocalizedStringsHandler.html" title="class in org.apache.cayenne.util"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/cayenne/util/MemoryClob.html" title="class in org.apache.cayenne.util"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/cayenne/util/MemoryBlob.html" target="_top">Frames</a></li>
<li><a href="MemoryBlob.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>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="subNavList">
<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>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.cayenne.util</div>
<h2 title="Class MemoryBlob" class="title">Class MemoryBlob</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://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.cayenne.util.MemoryBlob</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Blob.html?is-external=true" title="class or interface in java.sql">Blob</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">MemoryBlob</span>
extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Blob.html?is-external=true" title="class or interface in java.sql">Blob</a></pre>
<div class="block">A Blob implementation that stores content in memory.
<p>
<i>This implementation is based on jdbcBlob from HSQLDB (copyright HSQL Development
Group).</i>
</p></div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.2</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/util/MemoryBlob.html#MemoryBlob--">MemoryBlob</a></span>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/util/MemoryBlob.html#MemoryBlob-byte:A-">MemoryBlob</a></span>(byte[]&nbsp;data)</code>
<div class="block">Constructs a new MemoryBlob instance wrapping the given octet sequence.</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="t2" class="tableTab"><span><a href="javascript:show(2);">Instance 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>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/util/MemoryBlob.html#free--">free</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/util/MemoryBlob.html#getBinaryStream--">getBinaryStream</a></span>()</code>
<div class="block">Retrieves the <code>BLOB</code> value designated by this <code>Blob</code> instance
as a stream.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/util/MemoryBlob.html#getBinaryStream-long-long-">getBinaryStream</a></span>(long&nbsp;arg0,
long&nbsp;arg1)</code>&nbsp;</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/util/MemoryBlob.html#getBytes-long-int-">getBytes</a></span>(long&nbsp;pos,
int&nbsp;length)</code>
<div class="block">Retrieves all or part of the <code>BLOB</code> value that this <code>Blob</code>
object represents, as an array of bytes.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/util/MemoryBlob.html#length--">length</a></span>()</code>
<div class="block">Returns the number of bytes in the <code>BLOB</code> value designated by this
<code>Blob</code> object.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/util/MemoryBlob.html#position-java.sql.Blob-long-">position</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Blob.html?is-external=true" title="class or interface in java.sql">Blob</a>&nbsp;pattern,
long&nbsp;start)</code>
<div class="block">Retrieves the byte position in the <code>BLOB</code> value designated by this
<code>Blob</code> object at which <code>pattern</code> begins.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/util/MemoryBlob.html#position-byte:A-long-">position</a></span>(byte[]&nbsp;pattern,
long&nbsp;start)</code>
<div class="block">Retrieves the byte position at which the specified byte array <code>pattern</code>
begins within the <code>BLOB</code> value that this <code>Blob</code> object
represents.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/util/MemoryBlob.html#setBinaryStream-long-">setBinaryStream</a></span>(long&nbsp;pos)</code>
<div class="block">Always throws an exception.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/util/MemoryBlob.html#setBytes-long-byte:A-">setBytes</a></span>(long&nbsp;pos,
byte[]&nbsp;bytes)</code>
<div class="block">Always throws an exception.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/util/MemoryBlob.html#setBytes-long-byte:A-int-int-">setBytes</a></span>(long&nbsp;pos,
byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;len)</code>
<div class="block">Always throws an exception.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/util/MemoryBlob.html#truncate-long-">truncate</a></span>(long&nbsp;len)</code>
<div class="block">Truncates the <code>BLOB</code> value that this <code>Blob</code> object represents
to be <code>len</code> bytes in length.</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="https://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="https://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="https://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="https://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="https://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="https://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="https://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="https://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="https://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="https://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="https://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="https://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">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="MemoryBlob--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MemoryBlob</h4>
<pre>public&nbsp;MemoryBlob()</pre>
</li>
</ul>
<a name="MemoryBlob-byte:A-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>MemoryBlob</h4>
<pre>public&nbsp;MemoryBlob(byte[]&nbsp;data)</pre>
<div class="block">Constructs a new MemoryBlob instance wrapping the given octet sequence.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - the octet sequence representing the Blob value</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/CayenneRuntimeException.html" title="class in org.apache.cayenne">CayenneRuntimeException</a></code> - if the argument is null</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="length--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>length</h4>
<pre>public&nbsp;long&nbsp;length()
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Returns the number of bytes in the <code>BLOB</code> value designated by this
<code>Blob</code> object.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Blob.html?is-external=true#length--" title="class or interface in java.sql">length</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Blob.html?is-external=true" title="class or interface in java.sql">Blob</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>length of the <code>BLOB</code> in bytes</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code> - if there is an error accessing the length of the
<code>BLOB</code></dd>
</dl>
</li>
</ul>
<a name="getBytes-long-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBytes</h4>
<pre>public&nbsp;byte[]&nbsp;getBytes(long&nbsp;pos,
int&nbsp;length)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Retrieves all or part of the <code>BLOB</code> value that this <code>Blob</code>
object represents, as an array of bytes. This <code>byte</code> array contains up
to <code>length</code> consecutive bytes starting at position <code>pos</code>.
<p>
The official specification is ambiguous in that it does not precisely indicate the
policy to be observed when pos &gt; this.length() - length. One policy would be to
retrieve the octets from pos to this.length(). Another would be to throw an
exception. This implementation observes the later policy.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Blob.html?is-external=true#getBytes-long-int-" title="class or interface in java.sql">getBytes</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Blob.html?is-external=true" title="class or interface in java.sql">Blob</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pos</code> - the ordinal position of the first byte in the <code>BLOB</code> value to
be extracted; the first byte is at position 1</dd>
<dd><code>length</code> - the number of consecutive bytes to be copied</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a byte array containing up to <code>length</code> consecutive bytes from
the <code>BLOB</code> value designated by this <code>Blob</code> object,
starting with the byte at position <code>pos</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code> - if there is an error accessing the <code>BLOB</code> value</dd>
</dl>
</li>
</ul>
<a name="getBinaryStream--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBinaryStream</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;getBinaryStream()
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Retrieves the <code>BLOB</code> value designated by this <code>Blob</code> instance
as a stream.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Blob.html?is-external=true#getBinaryStream--" title="class or interface in java.sql">getBinaryStream</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Blob.html?is-external=true" title="class or interface in java.sql">Blob</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a stream containing the <code>BLOB</code> data</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code> - if there is an error accessing the <code>BLOB</code> value</dd>
</dl>
</li>
</ul>
<a name="position-byte:A-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>position</h4>
<pre>public&nbsp;long&nbsp;position(byte[]&nbsp;pattern,
long&nbsp;start)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Retrieves the byte position at which the specified byte array <code>pattern</code>
begins within the <code>BLOB</code> value that this <code>Blob</code> object
represents. The search for <code>pattern</code> begins at position
<code>start</code>.
<p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Blob.html?is-external=true#position-byte:A-long-" title="class or interface in java.sql">position</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Blob.html?is-external=true" title="class or interface in java.sql">Blob</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pattern</code> - the byte array for which to search</dd>
<dd><code>start</code> - the position at which to begin searching; the first position is 1</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the position at which the pattern appears, else -1</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code> - if there is an error accessing the <code>BLOB</code></dd>
</dl>
</li>
</ul>
<a name="position-java.sql.Blob-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>position</h4>
<pre>public&nbsp;long&nbsp;position(<a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Blob.html?is-external=true" title="class or interface in java.sql">Blob</a>&nbsp;pattern,
long&nbsp;start)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Retrieves the byte position in the <code>BLOB</code> value designated by this
<code>Blob</code> object at which <code>pattern</code> begins. The search begins at
position <code>start</code>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Blob.html?is-external=true#position-java.sql.Blob-long-" title="class or interface in java.sql">position</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Blob.html?is-external=true" title="class or interface in java.sql">Blob</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pattern</code> - the <code>Blob</code> object designating the <code>BLOB</code> value
for which to search</dd>
<dd><code>start</code> - the position in the <code>BLOB</code> value at which to begin
searching; the first position is 1</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the position at which the pattern begins, else -1</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code> - if there is an error accessing the <code>BLOB</code> value</dd>
</dl>
</li>
</ul>
<a name="setBytes-long-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBytes</h4>
<pre>public&nbsp;int&nbsp;setBytes(long&nbsp;pos,
byte[]&nbsp;bytes)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Always throws an exception.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Blob.html?is-external=true#setBytes-long-byte:A-" title="class or interface in java.sql">setBytes</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Blob.html?is-external=true" title="class or interface in java.sql">Blob</a></code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="setBytes-long-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBytes</h4>
<pre>public&nbsp;int&nbsp;setBytes(long&nbsp;pos,
byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;len)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Always throws an exception.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Blob.html?is-external=true#setBytes-long-byte:A-int-int-" title="class or interface in java.sql">setBytes</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Blob.html?is-external=true" title="class or interface in java.sql">Blob</a></code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="setBinaryStream-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBinaryStream</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;setBinaryStream(long&nbsp;pos)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Always throws an exception.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Blob.html?is-external=true#setBinaryStream-long-" title="class or interface in java.sql">setBinaryStream</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Blob.html?is-external=true" title="class or interface in java.sql">Blob</a></code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="truncate-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>truncate</h4>
<pre>public&nbsp;void&nbsp;truncate(long&nbsp;len)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Truncates the <code>BLOB</code> value that this <code>Blob</code> object represents
to be <code>len</code> bytes in length.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Blob.html?is-external=true#truncate-long-" title="class or interface in java.sql">truncate</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Blob.html?is-external=true" title="class or interface in java.sql">Blob</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>len</code> - the length, in bytes, to which the <code>BLOB</code> value that this
<code>Blob</code> object represents should be truncated</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code> - if there is an error accessing the <code>BLOB</code> value</dd>
</dl>
</li>
</ul>
<a name="free--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>free</h4>
<pre>public&nbsp;void&nbsp;free()
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Blob.html?is-external=true#free--" title="class or interface in java.sql">free</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Blob.html?is-external=true" title="class or interface in java.sql">Blob</a></code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>3.0</dd>
</dl>
</li>
</ul>
<a name="getBinaryStream-long-long-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getBinaryStream</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;getBinaryStream(long&nbsp;arg0,
long&nbsp;arg1)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Blob.html?is-external=true#getBinaryStream-long-long-" title="class or interface in java.sql">getBinaryStream</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Blob.html?is-external=true" title="class or interface in java.sql">Blob</a></code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>3.0</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/MemoryBlob.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><a href="../../../../org/apache/cayenne/util/LocalizedStringsHandler.html" title="class in org.apache.cayenne.util"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/cayenne/util/MemoryClob.html" title="class in org.apache.cayenne.util"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/cayenne/util/MemoryBlob.html" target="_top">Frames</a></li>
<li><a href="MemoryBlob.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>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="subNavList">
<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>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2001&#x2013;2019 <a href="http://cayenne.apache.org/">Apache Cayenne</a>. All rights reserved.</small></p>
</body>
</html>