blob: 6a571374f1a56630985b41c72a0a342140a63791 [file] [log] [blame]
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Class BytesRef
| Apache Lucene.NET 4.8.0-beta00010 Documentation </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Class BytesRef
| Apache Lucene.NET 4.8.0-beta00010 Documentation ">
<meta name="generator" content="docfx 2.56.0.0">
<link rel="shortcut icon" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/logo/favicon.ico">
<link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.vendor.css">
<link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.css">
<link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/main.css">
<meta property="docfx:navrel" content="toc.html">
<meta property="docfx:tocrel" content="core/toc.html">
<meta property="docfx:rel" content="https://lucenenet.apache.org/docs/4.8.0-beta00009/">
</head>
<body data-spy="scroll" data-target="#affix" data-offset="120">
<div id="wrapper">
<header>
<nav id="autocollapse" class="navbar ng-scope" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">
<img id="logo" class="svg" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/logo/lucene-net-color.png" alt="">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<form class="navbar-form navbar-right" role="search" id="search">
<div class="form-group">
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
</div>
</form>
</div>
</div>
</nav>
<div class="subnav navbar navbar-default">
<div class="container hide-when-search">
<ul class="level0 breadcrumb">
<li>
<a href="https://lucenenet.apache.org/docs/4.8.0-beta00009/">API</a>
<span id="breadcrumb">
<ul class="breadcrumb">
<li></li>
</ul>
</span>
</li>
</ul>
</div>
</div>
</header>
<div class="container body-content">
<div id="search-results">
<div class="search-list"></div>
<div class="sr-items">
<p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
</div>
<ul id="pagination"></ul>
</div>
</div>
<div role="main" class="container body-content hide-when-search">
<div class="sidenav hide-when-search">
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
<div class="sidetoggle collapse" id="sidetoggle">
<div id="sidetoc"></div>
</div>
</div>
<div class="article row grid-right">
<div class="col-md-10">
<article class="content wrap" id="_content" data-uid="Lucene.Net.Util.BytesRef">
<h1 id="Lucene_Net_Util_BytesRef" data-uid="Lucene.Net.Util.BytesRef" class="text-break">Class BytesRef
</h1>
<div class="markdown level0 summary"><p>Represents <span class="xref">byte[]</span>, as a slice (offset + length) into an
existing <span class="xref">byte[]</span>. The <a class="xref" href="Lucene.Net.Util.BytesRef.html#Lucene_Net_Util_BytesRef_Bytes">Bytes</a> property should never be <code>null</code>;
use <a class="xref" href="Lucene.Net.Util.BytesRef.html#Lucene_Net_Util_BytesRef_EMPTY_BYTES">EMPTY_BYTES</a> if necessary.</p>
<p><p><strong>Important note:</strong> Unless otherwise noted, Lucene uses this class to
represent terms that are encoded as <strong>UTF8</strong> bytes in the index. To
convert them to a .NET <span class="xref">System.String</span> (which is UTF16), use <a class="xref" href="Lucene.Net.Util.BytesRef.html#Lucene_Net_Util_BytesRef_Utf8ToString">Utf8ToString()</a>.
Using code like <code>new String(bytes, offset, length)</code> to do this
is <strong>wrong</strong>, as it does not respect the correct character set
and may return wrong results (depending on the platform&apos;s defaults)!</p>
</div>
<div class="markdown level0 conceptual"></div>
<div class="inheritance">
<h5>Inheritance</h5>
<div class="level0"><span class="xref">System.Object</span></div>
<div class="level1"><span class="xref">BytesRef</span></div>
</div>
<div classs="implements">
<h5>Implements</h5>
<div><span class="xref">System.IComparable</span>&lt;<a class="xref" href="Lucene.Net.Util.BytesRef.html">BytesRef</a>&gt;</div>
<div><span class="xref">System.IComparable</span></div>
<div><span class="xref">System.IEquatable</span>&lt;<a class="xref" href="Lucene.Net.Util.BytesRef.html">BytesRef</a>&gt;</div>
</div>
<div class="inheritedMembers">
<h5>Inherited Members</h5>
<div>
<span class="xref">System.Object.Equals(System.Object, System.Object)</span>
</div>
<div>
<span class="xref">System.Object.GetType()</span>
</div>
<div>
<span class="xref">System.Object.MemberwiseClone()</span>
</div>
<div>
<span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
</div>
</div>
<h6><strong>Namespace</strong>: <a class="xref" href="Lucene.Net.Util.html">Lucene.Net.Util</a></h6>
<h6><strong>Assembly</strong>: Lucene.Net.dll</h6>
<h5 id="Lucene_Net_Util_BytesRef_syntax">Syntax</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[Serializable]
public sealed class BytesRef : IComparable&lt;BytesRef&gt;, IComparable, IEquatable&lt;BytesRef&gt;</code></pre>
</div>
<h3 id="constructors">Constructors
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef__ctor.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.%23ctor%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L81">View Source</a>
</span>
<a id="Lucene_Net_Util_BytesRef__ctor_" data-uid="Lucene.Net.Util.BytesRef.#ctor*"></a>
<h4 id="Lucene_Net_Util_BytesRef__ctor" data-uid="Lucene.Net.Util.BytesRef.#ctor">BytesRef()</h4>
<div class="markdown level1 summary"><p>Create a <a class="xref" href="Lucene.Net.Util.BytesRef.html">BytesRef</a> with <a class="xref" href="Lucene.Net.Util.BytesRef.html#Lucene_Net_Util_BytesRef_EMPTY_BYTES">EMPTY_BYTES</a> </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public BytesRef()</code></pre>
</div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef__ctor_J2N_Text_ICharSequence_.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.%23ctor(J2N.Text.ICharSequence)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L122">View Source</a>
</span>
<a id="Lucene_Net_Util_BytesRef__ctor_" data-uid="Lucene.Net.Util.BytesRef.#ctor*"></a>
<h4 id="Lucene_Net_Util_BytesRef__ctor_J2N_Text_ICharSequence_" data-uid="Lucene.Net.Util.BytesRef.#ctor(J2N.Text.ICharSequence)">BytesRef(ICharSequence)</h4>
<div class="markdown level1 summary"><p>Initialize the <span class="xref">byte[]</span> from the UTF8 bytes
for the provided <span class="xref">J2N.Text.ICharSequence</span>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public BytesRef(ICharSequence text)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">J2N.Text.ICharSequence</span></td>
<td><span class="parametername">text</span></td>
<td><p>This must be well-formed
unicode text, with no unpaired surrogates. </p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef__ctor_System_Byte___.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.%23ctor(System.Byte%5B%5D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L102">View Source</a>
</span>
<a id="Lucene_Net_Util_BytesRef__ctor_" data-uid="Lucene.Net.Util.BytesRef.#ctor*"></a>
<h4 id="Lucene_Net_Util_BytesRef__ctor_System_Byte___" data-uid="Lucene.Net.Util.BytesRef.#ctor(System.Byte[])">BytesRef(Byte[])</h4>
<div class="markdown level1 summary"><p>This instance will directly reference <code data-dev-comment-type="paramref" class="paramref">bytes</code> w/o making a copy.
<code data-dev-comment-type="paramref" class="paramref">bytes</code> should not be <code>null</code>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public BytesRef(byte[] bytes)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Byte</span>[]</td>
<td><span class="parametername">bytes</span></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef__ctor_System_Byte___System_Int32_System_Int32_.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.%23ctor(System.Byte%5B%5D%2CSystem.Int32%2CSystem.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L90">View Source</a>
</span>
<a id="Lucene_Net_Util_BytesRef__ctor_" data-uid="Lucene.Net.Util.BytesRef.#ctor*"></a>
<h4 id="Lucene_Net_Util_BytesRef__ctor_System_Byte___System_Int32_System_Int32_" data-uid="Lucene.Net.Util.BytesRef.#ctor(System.Byte[],System.Int32,System.Int32)">BytesRef(Byte[], Int32, Int32)</h4>
<div class="markdown level1 summary"><p>This instance will directly reference <code data-dev-comment-type="paramref" class="paramref">bytes</code> w/o making a copy.
<code data-dev-comment-type="paramref" class="paramref">bytes</code> should not be <code>null</code>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public BytesRef(byte[] bytes, int offset, int length)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Byte</span>[]</td>
<td><span class="parametername">bytes</span></td>
<td></td>
</tr>
<tr>
<td><span class="xref">System.Int32</span></td>
<td><span class="parametername">offset</span></td>
<td></td>
</tr>
<tr>
<td><span class="xref">System.Int32</span></td>
<td><span class="parametername">length</span></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef__ctor_System_Int32_.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.%23ctor(System.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L111">View Source</a>
</span>
<a id="Lucene_Net_Util_BytesRef__ctor_" data-uid="Lucene.Net.Util.BytesRef.#ctor*"></a>
<h4 id="Lucene_Net_Util_BytesRef__ctor_System_Int32_" data-uid="Lucene.Net.Util.BytesRef.#ctor(System.Int32)">BytesRef(Int32)</h4>
<div class="markdown level1 summary"><p>Create a <a class="xref" href="Lucene.Net.Util.BytesRef.html">BytesRef</a> pointing to a new array of size <code data-dev-comment-type="paramref" class="paramref">capacity</code>.
Offset and length will both be zero.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public BytesRef(int capacity)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Int32</span></td>
<td><span class="parametername">capacity</span></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef__ctor_System_String_.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.%23ctor(System.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L134">View Source</a>
</span>
<a id="Lucene_Net_Util_BytesRef__ctor_" data-uid="Lucene.Net.Util.BytesRef.#ctor*"></a>
<h4 id="Lucene_Net_Util_BytesRef__ctor_System_String_" data-uid="Lucene.Net.Util.BytesRef.#ctor(System.String)">BytesRef(String)</h4>
<div class="markdown level1 summary"><p>Initialize the <span class="xref">byte[]</span> from the UTF8 bytes
for the provided <span class="xref">System.String</span>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public BytesRef(string text)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">text</span></td>
<td><p>This must be well-formed
unicode text, with no unpaired surrogates. </p>
</td>
</tr>
</tbody>
</table>
<h3 id="fields">Fields
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef_EMPTY_BYTES.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.EMPTY_BYTES%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L50">View Source</a>
</span>
<h4 id="Lucene_Net_Util_BytesRef_EMPTY_BYTES" data-uid="Lucene.Net.Util.BytesRef.EMPTY_BYTES">EMPTY_BYTES</h4>
<div class="markdown level1 summary"><p>An empty byte array for convenience </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static readonly byte[] EMPTY_BYTES</code></pre>
</div>
<h5 class="fieldValue">Field Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Byte</span>[]</td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="properties">Properties
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef_Bytes.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.Bytes%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L60">View Source</a>
</span>
<a id="Lucene_Net_Util_BytesRef_Bytes_" data-uid="Lucene.Net.Util.BytesRef.Bytes*"></a>
<h4 id="Lucene_Net_Util_BytesRef_Bytes" data-uid="Lucene.Net.Util.BytesRef.Bytes">Bytes</h4>
<div class="markdown level1 summary"><p>The contents of the BytesRef. Should never be <code>null</code>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public byte[] Bytes { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Byte</span>[]</td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef_Length.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.Length%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L77">View Source</a>
</span>
<a id="Lucene_Net_Util_BytesRef_Length_" data-uid="Lucene.Net.Util.BytesRef.Length*"></a>
<h4 id="Lucene_Net_Util_BytesRef_Length" data-uid="Lucene.Net.Util.BytesRef.Length">Length</h4>
<div class="markdown level1 summary"><p>Length of used bytes.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int Length { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Int32</span></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef_Offset.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.Offset%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L72">View Source</a>
</span>
<a id="Lucene_Net_Util_BytesRef_Offset_" data-uid="Lucene.Net.Util.BytesRef.Offset*"></a>
<h4 id="Lucene_Net_Util_BytesRef_Offset" data-uid="Lucene.Net.Util.BytesRef.Offset">Offset</h4>
<div class="markdown level1 summary"><p>Offset of first valid byte.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int Offset { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Int32</span></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef_UTF8SortedAsUnicodeComparer.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.UTF8SortedAsUnicodeComparer%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L327">View Source</a>
</span>
<a id="Lucene_Net_Util_BytesRef_UTF8SortedAsUnicodeComparer_" data-uid="Lucene.Net.Util.BytesRef.UTF8SortedAsUnicodeComparer*"></a>
<h4 id="Lucene_Net_Util_BytesRef_UTF8SortedAsUnicodeComparer" data-uid="Lucene.Net.Util.BytesRef.UTF8SortedAsUnicodeComparer">UTF8SortedAsUnicodeComparer</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static IComparer&lt;BytesRef&gt; UTF8SortedAsUnicodeComparer { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Collections.Generic.IComparer</span>&lt;<a class="xref" href="Lucene.Net.Util.BytesRef.html">BytesRef</a>&gt;</td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef_UTF8SortedAsUTF16Comparer.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.UTF8SortedAsUTF16Comparer%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L336">View Source</a>
</span>
<a id="Lucene_Net_Util_BytesRef_UTF8SortedAsUTF16Comparer_" data-uid="Lucene.Net.Util.BytesRef.UTF8SortedAsUTF16Comparer*"></a>
<h4 id="Lucene_Net_Util_BytesRef_UTF8SortedAsUTF16Comparer" data-uid="Lucene.Net.Util.BytesRef.UTF8SortedAsUTF16Comparer">UTF8SortedAsUTF16Comparer</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[Obsolete(&quot;this comparer is only a transition mechanism&quot;)]
public static IComparer&lt;BytesRef&gt; UTF8SortedAsUTF16Comparer { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Collections.Generic.IComparer</span>&lt;<a class="xref" href="Lucene.Net.Util.BytesRef.html">BytesRef</a>&gt;</td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="methods">Methods
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef_Append_Lucene_Net_Util_BytesRef_.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.Append(Lucene.Net.Util.BytesRef)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L282">View Source</a>
</span>
<a id="Lucene_Net_Util_BytesRef_Append_" data-uid="Lucene.Net.Util.BytesRef.Append*"></a>
<h4 id="Lucene_Net_Util_BytesRef_Append_Lucene_Net_Util_BytesRef_" data-uid="Lucene.Net.Util.BytesRef.Append(Lucene.Net.Util.BytesRef)">Append(BytesRef)</h4>
<div class="markdown level1 summary"><p>Appends the bytes from the given <a class="xref" href="Lucene.Net.Util.BytesRef.html">BytesRef</a>
<p>
NOTE: if this would exceed the array size, this method creates a
new reference array.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Append(BytesRef other)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Util.BytesRef.html">BytesRef</a></td>
<td><span class="parametername">other</span></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef_BytesEquals_Lucene_Net_Util_BytesRef_.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.BytesEquals(Lucene.Net.Util.BytesRef)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L169">View Source</a>
</span>
<a id="Lucene_Net_Util_BytesRef_BytesEquals_" data-uid="Lucene.Net.Util.BytesRef.BytesEquals*"></a>
<h4 id="Lucene_Net_Util_BytesRef_BytesEquals_Lucene_Net_Util_BytesRef_" data-uid="Lucene.Net.Util.BytesRef.BytesEquals(Lucene.Net.Util.BytesRef)">BytesEquals(BytesRef)</h4>
<div class="markdown level1 summary"><p>Expert: Compares the bytes against another <a class="xref" href="Lucene.Net.Util.BytesRef.html">BytesRef</a>,
returning <code>true</code> if the bytes are equal.
<p>
<div class="lucene-block lucene-internal">This is a Lucene.NET INTERNAL API, use at your own risk</div></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public bool BytesEquals(BytesRef other)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Util.BytesRef.html">BytesRef</a></td>
<td><span class="parametername">other</span></td>
<td><p>Another <a class="xref" href="Lucene.Net.Util.BytesRef.html">BytesRef</a>, should not be <code>null</code>. </p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef_Clone.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.Clone%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L198">View Source</a>
</span>
<a id="Lucene_Net_Util_BytesRef_Clone_" data-uid="Lucene.Net.Util.BytesRef.Clone*"></a>
<h4 id="Lucene_Net_Util_BytesRef_Clone" data-uid="Lucene.Net.Util.BytesRef.Clone">Clone()</h4>
<div class="markdown level1 summary"><p>Returns a shallow clone of this instance (the underlying bytes are
<strong>not</strong> copied and will be shared by both the returned object and this
object.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public object Clone()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Object</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 id="Lucene_Net_Util_BytesRef_Clone_seealso">See Also</h5>
<div class="seealso">
<div><a class="xref" href="Lucene.Net.Util.BytesRef.html#Lucene_Net_Util_BytesRef_DeepCopyOf_Lucene_Net_Util_BytesRef_">DeepCopyOf(BytesRef)</a></div>
</div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef_CompareTo_Lucene_Net_Util_BytesRef_.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.CompareTo(Lucene.Net.Util.BytesRef)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L320">View Source</a>
</span>
<a id="Lucene_Net_Util_BytesRef_CompareTo_" data-uid="Lucene.Net.Util.BytesRef.CompareTo*"></a>
<h4 id="Lucene_Net_Util_BytesRef_CompareTo_Lucene_Net_Util_BytesRef_" data-uid="Lucene.Net.Util.BytesRef.CompareTo(Lucene.Net.Util.BytesRef)">CompareTo(BytesRef)</h4>
<div class="markdown level1 summary"><p>Unsigned byte order comparison </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int CompareTo(BytesRef other)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Util.BytesRef.html">BytesRef</a></td>
<td><span class="parametername">other</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Int32</span></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef_CompareTo_System_Object_.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.CompareTo(System.Object)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L311">View Source</a>
</span>
<a id="Lucene_Net_Util_BytesRef_CompareTo_" data-uid="Lucene.Net.Util.BytesRef.CompareTo*"></a>
<h4 id="Lucene_Net_Util_BytesRef_CompareTo_System_Object_" data-uid="Lucene.Net.Util.BytesRef.CompareTo(System.Object)">CompareTo(Object)</h4>
<div class="markdown level1 summary"><p>Unsigned byte order comparison </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int CompareTo(object other)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Object</span></td>
<td><span class="parametername">other</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Int32</span></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef_CopyBytes_Lucene_Net_Util_BytesRef_.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.CopyBytes(Lucene.Net.Util.BytesRef)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L265">View Source</a>
</span>
<a id="Lucene_Net_Util_BytesRef_CopyBytes_" data-uid="Lucene.Net.Util.BytesRef.CopyBytes*"></a>
<h4 id="Lucene_Net_Util_BytesRef_CopyBytes_Lucene_Net_Util_BytesRef_" data-uid="Lucene.Net.Util.BytesRef.CopyBytes(Lucene.Net.Util.BytesRef)">CopyBytes(BytesRef)</h4>
<div class="markdown level1 summary"><p>Copies the bytes from the given <a class="xref" href="Lucene.Net.Util.BytesRef.html">BytesRef</a>
<p>
NOTE: if this would exceed the array size, this method creates a
new reference array.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void CopyBytes(BytesRef other)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Util.BytesRef.html">BytesRef</a></td>
<td><span class="parametername">other</span></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef_CopyChars_J2N_Text_ICharSequence_.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.CopyChars(J2N.Text.ICharSequence)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L145">View Source</a>
</span>
<a id="Lucene_Net_Util_BytesRef_CopyChars_" data-uid="Lucene.Net.Util.BytesRef.CopyChars*"></a>
<h4 id="Lucene_Net_Util_BytesRef_CopyChars_J2N_Text_ICharSequence_" data-uid="Lucene.Net.Util.BytesRef.CopyChars(J2N.Text.ICharSequence)">CopyChars(ICharSequence)</h4>
<div class="markdown level1 summary"><p>Copies the UTF8 bytes for this <span class="xref">J2N.Text.ICharSequence</span>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void CopyChars(ICharSequence text)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">J2N.Text.ICharSequence</span></td>
<td><span class="parametername">text</span></td>
<td><p>Must be well-formed unicode text, with no
unpaired surrogates or invalid UTF16 code units. </p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef_CopyChars_System_String_.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.CopyChars(System.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L156">View Source</a>
</span>
<a id="Lucene_Net_Util_BytesRef_CopyChars_" data-uid="Lucene.Net.Util.BytesRef.CopyChars*"></a>
<h4 id="Lucene_Net_Util_BytesRef_CopyChars_System_String_" data-uid="Lucene.Net.Util.BytesRef.CopyChars(System.String)">CopyChars(String)</h4>
<div class="markdown level1 summary"><p>Copies the UTF8 bytes for this <span class="xref">System.String</span>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void CopyChars(string text)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">text</span></td>
<td><p>Must be well-formed unicode text, with no
unpaired surrogates or invalid UTF16 code units. </p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef_DeepCopyOf_Lucene_Net_Util_BytesRef_.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.DeepCopyOf(Lucene.Net.Util.BytesRef)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L350">View Source</a>
</span>
<a id="Lucene_Net_Util_BytesRef_DeepCopyOf_" data-uid="Lucene.Net.Util.BytesRef.DeepCopyOf*"></a>
<h4 id="Lucene_Net_Util_BytesRef_DeepCopyOf_Lucene_Net_Util_BytesRef_" data-uid="Lucene.Net.Util.BytesRef.DeepCopyOf(Lucene.Net.Util.BytesRef)">DeepCopyOf(BytesRef)</h4>
<div class="markdown level1 summary"><p>Creates a new <a class="xref" href="Lucene.Net.Util.BytesRef.html">BytesRef</a> that points to a copy of the bytes from
<code data-dev-comment-type="paramref" class="paramref">other</code>.
<p>
The returned <a class="xref" href="Lucene.Net.Util.BytesRef.html">BytesRef</a> will have a length of <code>other.Length</code>
and an offset of zero.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static BytesRef DeepCopyOf(BytesRef other)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Util.BytesRef.html">BytesRef</a></td>
<td><span class="parametername">other</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Util.BytesRef.html">BytesRef</a></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef_Equals_System_Object_.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.Equals(System.Object)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L215">View Source</a>
</span>
<a id="Lucene_Net_Util_BytesRef_Equals_" data-uid="Lucene.Net.Util.BytesRef.Equals*"></a>
<h4 id="Lucene_Net_Util_BytesRef_Equals_System_Object_" data-uid="Lucene.Net.Util.BytesRef.Equals(System.Object)">Equals(Object)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public override bool Equals(object other)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Object</span></td>
<td><span class="parametername">other</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><span class="xref">System.Object.Equals(System.Object)</span></div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef_GetHashCode.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.GetHashCode%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L210">View Source</a>
</span>
<a id="Lucene_Net_Util_BytesRef_GetHashCode_" data-uid="Lucene.Net.Util.BytesRef.GetHashCode*"></a>
<h4 id="Lucene_Net_Util_BytesRef_GetHashCode" data-uid="Lucene.Net.Util.BytesRef.GetHashCode">GetHashCode()</h4>
<div class="markdown level1 summary"><p>Calculates the hash code as required by <span class="xref">Lucene.Net.Index.TermsHash</span> during indexing.
<p> This is currently implemented as MurmurHash3 (32
bit), using the seed from
<a class="xref" href="Lucene.Net.Util.StringHelper.html#Lucene_Net_Util_StringHelper_GOOD_FAST_HASH_SEED">GOOD_FAST_HASH_SEED</a>, but is subject to
change from release to release.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public override int GetHashCode()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Int32</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><span class="xref">System.Object.GetHashCode()</span></div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef_Grow_System_Int32_.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.Grow(System.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L303">View Source</a>
</span>
<a id="Lucene_Net_Util_BytesRef_Grow_" data-uid="Lucene.Net.Util.BytesRef.Grow*"></a>
<h4 id="Lucene_Net_Util_BytesRef_Grow_System_Int32_" data-uid="Lucene.Net.Util.BytesRef.Grow(System.Int32)">Grow(Int32)</h4>
<div class="markdown level1 summary"><p>Used to grow the reference array.
<p>
In general this should not be used as it does not take the offset into account.
<p>
<div class="lucene-block lucene-internal">This is a Lucene.NET INTERNAL API, use at your own risk</div></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Grow(int newLength)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Int32</span></td>
<td><span class="parametername">newLength</span></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef_IsValid.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.IsValid%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L361">View Source</a>
</span>
<a id="Lucene_Net_Util_BytesRef_IsValid_" data-uid="Lucene.Net.Util.BytesRef.IsValid*"></a>
<h4 id="Lucene_Net_Util_BytesRef_IsValid" data-uid="Lucene.Net.Util.BytesRef.IsValid">IsValid()</h4>
<div class="markdown level1 summary"><p>Performs internal consistency checks.
Always returns true (or throws <span class="xref">System.InvalidOperationException</span>)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public bool IsValid()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef_ToString.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.ToString%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L242">View Source</a>
</span>
<a id="Lucene_Net_Util_BytesRef_ToString_" data-uid="Lucene.Net.Util.BytesRef.ToString*"></a>
<h4 id="Lucene_Net_Util_BytesRef_ToString" data-uid="Lucene.Net.Util.BytesRef.ToString">ToString()</h4>
<div class="markdown level1 summary"><p>Returns hex encoded bytes, eg [0x6c 0x75 0x63 0x65 0x6e 0x65] </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public override string ToString()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><span class="xref">System.Object.ToString()</span></div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef_Utf8ToString.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.Utf8ToString%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L233">View Source</a>
</span>
<a id="Lucene_Net_Util_BytesRef_Utf8ToString_" data-uid="Lucene.Net.Util.BytesRef.Utf8ToString*"></a>
<h4 id="Lucene_Net_Util_BytesRef_Utf8ToString" data-uid="Lucene.Net.Util.BytesRef.Utf8ToString">Utf8ToString()</h4>
<div class="markdown level1 summary"><p>Interprets stored bytes as UTF8 bytes, returning the
resulting <span class="xref">System.String</span>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string Utf8ToString()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="eii">Explicit Interface Implementations
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef_System_IEquatable_Lucene_Net_Util_BytesRef__Equals_Lucene_Net_Util_BytesRef_.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef.System%23IEquatable%7BLucene%23Net%23Util%23BytesRef%7D%23Equals(Lucene.Net.Util.BytesRef)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L226">View Source</a>
</span>
<a id="Lucene_Net_Util_BytesRef_System_IEquatable_Lucene_Net_Util_BytesRef__Equals_" data-uid="Lucene.Net.Util.BytesRef.System#IEquatable{Lucene#Net#Util#BytesRef}#Equals*"></a>
<h4 id="Lucene_Net_Util_BytesRef_System_IEquatable_Lucene_Net_Util_BytesRef__Equals_Lucene_Net_Util_BytesRef_" data-uid="Lucene.Net.Util.BytesRef.System#IEquatable{Lucene#Net#Util#BytesRef}#Equals(Lucene.Net.Util.BytesRef)">IEquatable&lt;BytesRef&gt;.Equals(BytesRef)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">bool IEquatable&lt;BytesRef&gt;.Equals(BytesRef other)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Util.BytesRef.html">BytesRef</a></td>
<td><span class="parametername">other</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="implements">Implements</h3>
<div>
<span class="xref">System.IComparable&lt;T&gt;</span>
</div>
<div>
<span class="xref">System.IComparable</span>
</div>
<div>
<span class="xref">System.IEquatable&lt;T&gt;</span>
</div>
</article>
</div>
<div class="hidden-sm col-md-2" role="complementary">
<div class="sideaffix">
<div class="contribution">
<ul class="nav">
<li>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_BytesRef.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.BytesRef%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
</li>
<li>
<a href="https://github.com/apache/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/BytesRef.cs/#L41" class="contribution-link">View Source</a>
</li>
</ul>
</div>
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
</nav>
</div>
</div>
</div>
</div>
<footer>
<div class="grad-bottom"></div>
<div class="footer">
<div class="container">
<span class="pull-right">
<a href="#top">Back to top</a>
</span>
Copyright © 2020 Licensed to the Apache Software Foundation (ASF)
</div>
</div>
</footer>
</div>
<script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.vendor.js"></script>
<script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.js"></script>
<script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/main.js"></script>
</body>
</html>