blob: 23063657795b003471a5b3a8c0768aeeeb0bae40 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>ByteString (Apache Calcite Avatica API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-migrate-3.0.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ByteString (Apache Calcite Avatica API)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":9,"i11":9,"i12":9,"i13":9,"i14":10,"i15":10,"i16":10,"i17":10,"i18":9,"i19":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ByteString.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" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&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><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.calcite.avatica.util</a></div>
<h2 title="Class ByteString" class="title">Class ByteString</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.calcite.avatica.util.ByteString</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code>java.io.Serializable</code>, <code>java.lang.Comparable&lt;<a href="ByteString.html" title="class in org.apache.calcite.avatica.util">ByteString</a>&gt;</code></dd>
</dl>
<hr>
<pre>public class <span class="typeNameLabel">ByteString</span>
extends java.lang.Object
implements java.lang.Comparable&lt;<a href="ByteString.html" title="class in org.apache.calcite.avatica.util">ByteString</a>&gt;, java.io.Serializable</pre>
<div class="block">Collection of bytes.
<p>ByteString is to bytes what <code>String</code> is to chars: It is immutable,
implements equality (<a href="#hashCode()"><code>hashCode()</code></a> and <a href="#equals(java.lang.Object)"><code>equals(java.lang.Object)</code></a>),
comparison (<a href="#compareTo(org.apache.calcite.avatica.util.ByteString)"><code>compareTo(org.apache.calcite.avatica.util.ByteString)</code></a>) and
<code>serialization</code> correctly.</p></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../serialized-form.html#org.apache.calcite.avatica.util.ByteString">Serialized Form</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="ByteString.html" title="class in org.apache.calcite.avatica.util">ByteString</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#EMPTY">EMPTY</a></span></code></th>
<td class="colLast">
<div class="block">An empty byte string.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(byte%5B%5D)">ByteString</a></span>&#8203;(byte[]&nbsp;bytes)</code></th>
<td class="colLast">
<div class="block">Creates a ByteString.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<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="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="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>byte</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#byteAt(int)">byteAt</a></span>&#8203;(int&nbsp;i)</code></th>
<td class="colLast">
<div class="block">Returns the byte at a given position in the byte string.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#clone()">clone</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#compareTo(org.apache.calcite.avatica.util.ByteString)">compareTo</a></span>&#8203;(<a href="ByteString.html" title="class in org.apache.calcite.avatica.util">ByteString</a>&nbsp;that)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="ByteString.html" title="class in org.apache.calcite.avatica.util">ByteString</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#concat(org.apache.calcite.avatica.util.ByteString)">concat</a></span>&#8203;(<a href="ByteString.html" title="class in org.apache.calcite.avatica.util">ByteString</a>&nbsp;other)</code></th>
<td class="colLast">
<div class="block">Returns a ByteString consisting of the concatenation of this and another
string.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#equals(java.lang.Object)">equals</a></span>&#8203;(java.lang.Object&nbsp;obj)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>byte[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBytes()">getBytes</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a copy of the byte array.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hashCode()">hashCode</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#indexOf(org.apache.calcite.avatica.util.ByteString)">indexOf</a></span>&#8203;(<a href="ByteString.html" title="class in org.apache.calcite.avatica.util">ByteString</a>&nbsp;seek)</code></th>
<td class="colLast">
<div class="block">Returns the position at which <code>seek</code> first occurs in this byte
string, or -1 if it does not occur.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#indexOf(org.apache.calcite.avatica.util.ByteString,int)">indexOf</a></span>&#8203;(<a href="ByteString.html" title="class in org.apache.calcite.avatica.util">ByteString</a>&nbsp;seek,
int&nbsp;start)</code></th>
<td class="colLast">
<div class="block">Returns the position at which <code>seek</code> first occurs in this byte
string, starting at the specified index, or -1 if it does not occur.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#length()">length</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the number of bytes in this byte string.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static <a href="ByteString.html" title="class in org.apache.calcite.avatica.util">ByteString</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#of(java.lang.String,int)">of</a></span>&#8203;(java.lang.String&nbsp;string,
int&nbsp;base)</code></th>
<td class="colLast">
<div class="block">Creates a byte string from a hexadecimal or binary string.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static <a href="ByteString.html" title="class in org.apache.calcite.avatica.util">ByteString</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ofBase64(java.lang.String)">ofBase64</a></span>&#8203;(java.lang.String&nbsp;string)</code></th>
<td class="colLast">
<div class="block">Creates a byte string from a Base64 string.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parse(java.lang.String,int)">parse</a></span>&#8203;(java.lang.String&nbsp;string,
int&nbsp;base)</code></th>
<td class="colLast">
<div class="block">Parses a hexadecimal or binary string to a byte array.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parseBase64(java.lang.String)">parseBase64</a></span>&#8203;(java.lang.String&nbsp;string)</code></th>
<td class="colLast">
<div class="block">Parses a Base64 to a byte array.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="ByteString.html" title="class in org.apache.calcite.avatica.util">ByteString</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#substring(int)">substring</a></span>&#8203;(int&nbsp;start)</code></th>
<td class="colLast">
<div class="block">Returns a ByteString that starts at a given position.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code><a href="ByteString.html" title="class in org.apache.calcite.avatica.util">ByteString</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#substring(int,int)">substring</a></span>&#8203;(int&nbsp;start,
int&nbsp;end)</code></th>
<td class="colLast">
<div class="block">Returns a ByteString that consists of a given range.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toBase64String()">toBase64String</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns this byte string in Base64 format.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString()">toString</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns this byte string in hexadecimal format.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString(byte%5B%5D,int)">toString</a></span>&#8203;(byte[]&nbsp;bytes,
int&nbsp;base)</code></th>
<td class="colLast">
<div class="block">Returns the given byte array in hexadecimal format.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString(int)">toString</a></span>&#8203;(int&nbsp;base)</code></th>
<td class="colLast">
<div class="block">Returns this byte string in a given base.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>finalize, getClass, notify, notifyAll, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a id="EMPTY">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>EMPTY</h4>
<pre>public static final&nbsp;<a href="ByteString.html" title="class in org.apache.calcite.avatica.util">ByteString</a> EMPTY</pre>
<div class="block">An empty byte string.</div>
</li>
</ul>
</li>
</ul>
</section>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;(byte[])">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ByteString</h4>
<pre>public&nbsp;ByteString&#8203;(byte[]&nbsp;bytes)</pre>
<div class="block">Creates a ByteString.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - Bytes</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="hashCode()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;hashCode()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>hashCode</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a id="equals(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;equals&#8203;(java.lang.Object&nbsp;obj)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>equals</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a id="compareTo(org.apache.calcite.avatica.util.ByteString)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>compareTo</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;compareTo&#8203;(<a href="ByteString.html" title="class in org.apache.calcite.avatica.util">ByteString</a>&nbsp;that)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>compareTo</code>&nbsp;in interface&nbsp;<code>java.lang.Comparable&lt;<a href="ByteString.html" title="class in org.apache.calcite.avatica.util">ByteString</a>&gt;</code></dd>
</dl>
</li>
</ul>
<a id="toString()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre class="methodSignature">public&nbsp;java.lang.String&nbsp;toString()</pre>
<div class="block">Returns this byte string in hexadecimal format.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Hexadecimal string</dd>
</dl>
</li>
</ul>
<a id="toString(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre class="methodSignature">public&nbsp;java.lang.String&nbsp;toString&#8203;(int&nbsp;base)</pre>
<div class="block">Returns this byte string in a given base.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>String in given base</dd>
</dl>
</li>
</ul>
<a id="toString(byte[],int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre class="methodSignature">public static&nbsp;java.lang.String&nbsp;toString&#8203;(byte[]&nbsp;bytes,
int&nbsp;base)</pre>
<div class="block">Returns the given byte array in hexadecimal format.
<p>For example, <code>toString(new byte[] {0xDE, 0xAD})</code>
returns <code>"DEAD"</code>.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - Array of bytes</dd>
<dd><code>base</code> - Base (2 or 16)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>String</dd>
</dl>
</li>
</ul>
<a id="toBase64String()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBase64String</h4>
<pre class="methodSignature">public&nbsp;java.lang.String&nbsp;toBase64String()</pre>
<div class="block">Returns this byte string in Base64 format.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Base64 string</dd>
</dl>
</li>
</ul>
<a id="of(java.lang.String,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>of</h4>
<pre class="methodSignature">public static&nbsp;<a href="ByteString.html" title="class in org.apache.calcite.avatica.util">ByteString</a>&nbsp;of&#8203;(java.lang.String&nbsp;string,
int&nbsp;base)</pre>
<div class="block">Creates a byte string from a hexadecimal or binary string.
<p>For example, <code>of("DEAD", 16)</code>
returns the same as <code>ByteString(new byte[] {0xDE, 0xAD})</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>string</code> - Array of bytes</dd>
<dd><code>base</code> - Base (2 or 16)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>String</dd>
</dl>
</li>
</ul>
<a id="parse(java.lang.String,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parse</h4>
<pre class="methodSignature">public static&nbsp;byte[]&nbsp;parse&#8203;(java.lang.String&nbsp;string,
int&nbsp;base)</pre>
<div class="block">Parses a hexadecimal or binary string to a byte array.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>string</code> - Hexadecimal or binary string</dd>
<dd><code>base</code> - Base (2 or 16)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Byte array</dd>
</dl>
</li>
</ul>
<a id="ofBase64(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ofBase64</h4>
<pre class="methodSignature">public static&nbsp;<a href="ByteString.html" title="class in org.apache.calcite.avatica.util">ByteString</a>&nbsp;ofBase64&#8203;(java.lang.String&nbsp;string)</pre>
<div class="block">Creates a byte string from a Base64 string.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>string</code> - Base64 string</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Byte string</dd>
</dl>
</li>
</ul>
<a id="parseBase64(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseBase64</h4>
<pre class="methodSignature">public static&nbsp;byte[]&nbsp;parseBase64&#8203;(java.lang.String&nbsp;string)</pre>
<div class="block">Parses a Base64 to a byte array.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>string</code> - Base64 string</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Byte array</dd>
</dl>
</li>
</ul>
<a id="clone()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clone</h4>
<pre class="methodSignature">public&nbsp;java.lang.Object&nbsp;clone()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>clone</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a id="length()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>length</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;length()</pre>
<div class="block">Returns the number of bytes in this byte string.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Length of this byte string</dd>
</dl>
</li>
</ul>
<a id="byteAt(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>byteAt</h4>
<pre class="methodSignature">public&nbsp;byte&nbsp;byteAt&#8203;(int&nbsp;i)</pre>
<div class="block">Returns the byte at a given position in the byte string.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>i</code> - Index</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Byte at given position</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IndexOutOfBoundsException</code> - if the <code>index</code> argument is
negative or not less than <code>length()</code></dd>
</dl>
</li>
</ul>
<a id="substring(int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>substring</h4>
<pre class="methodSignature">public&nbsp;<a href="ByteString.html" title="class in org.apache.calcite.avatica.util">ByteString</a>&nbsp;substring&#8203;(int&nbsp;start,
int&nbsp;end)</pre>
<div class="block">Returns a ByteString that consists of a given range.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>start</code> - Start of range</dd>
<dd><code>end</code> - Position after end of range</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Substring</dd>
</dl>
</li>
</ul>
<a id="substring(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>substring</h4>
<pre class="methodSignature">public&nbsp;<a href="ByteString.html" title="class in org.apache.calcite.avatica.util">ByteString</a>&nbsp;substring&#8203;(int&nbsp;start)</pre>
<div class="block">Returns a ByteString that starts at a given position.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>start</code> - Start of range</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Substring</dd>
</dl>
</li>
</ul>
<a id="getBytes()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBytes</h4>
<pre class="methodSignature">public&nbsp;byte[]&nbsp;getBytes()</pre>
<div class="block">Returns a copy of the byte array.</div>
</li>
</ul>
<a id="concat(org.apache.calcite.avatica.util.ByteString)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>concat</h4>
<pre class="methodSignature">public&nbsp;<a href="ByteString.html" title="class in org.apache.calcite.avatica.util">ByteString</a>&nbsp;concat&#8203;(<a href="ByteString.html" title="class in org.apache.calcite.avatica.util">ByteString</a>&nbsp;other)</pre>
<div class="block">Returns a ByteString consisting of the concatenation of this and another
string.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>other</code> - Byte string to concatenate</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Combined byte string</dd>
</dl>
</li>
</ul>
<a id="indexOf(org.apache.calcite.avatica.util.ByteString)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>indexOf</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;indexOf&#8203;(<a href="ByteString.html" title="class in org.apache.calcite.avatica.util">ByteString</a>&nbsp;seek)</pre>
<div class="block">Returns the position at which <code>seek</code> first occurs in this byte
string, or -1 if it does not occur.</div>
</li>
</ul>
<a id="indexOf(org.apache.calcite.avatica.util.ByteString,int)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>indexOf</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;indexOf&#8203;(<a href="ByteString.html" title="class in org.apache.calcite.avatica.util">ByteString</a>&nbsp;seek,
int&nbsp;start)</pre>
<div class="block">Returns the position at which <code>seek</code> first occurs in this byte
string, starting at the specified index, or -1 if it does not occur.</div>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ByteString.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" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&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><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2012&#x2013;2019 <a href="https://www.apache.org">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>