congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ByteBlockPool.copy
Code IndexAdd Tabnine to your IDE (free)

How to use
copy
method
in
org.apache.lucene.util.ByteBlockPool

Best Java code snippets using org.apache.lucene.util.ByteBlockPool.copy (Showing top 1 results out of 315)

origin: org.apache.lucene/lucene-spellchecker

/**
 * Appends a copy of the given {@link BytesRef} to this {@link BytesRefList}.
 * @param bytes the bytes to append
 * @return the ordinal of the appended bytes
 */
public int append(BytesRef bytes) {
 if (lastElement >= offsets.length) {
  int oldLen = offsets.length;
  offsets = ArrayUtil.grow(offsets, offsets.length + 1);
  bytesUsed.addAndGet((offsets.length - oldLen)
    * RamUsageEstimator.NUM_BYTES_INT);
 }
 pool.copy(bytes);
 offsets[lastElement++] = currentOffset;
 currentOffset += bytes.length;
 return lastElement;
}

org.apache.lucene.utilByteBlockPoolcopy

Popular methods of ByteBlockPool

  • <init>
  • reset
    Expert: Resets the pool to its initial state reusing the first buffer. Calling ByteBlockPool#nextBuf
  • nextBuffer
    Advances the pool to its next buffer. This method should be called once after the constructor to ini
  • allocSlice
    Creates a new byte slice with the given starting size and returns the slices offset in the pool.
  • append
    Appends the bytes in the provided BytesRef at the current position.
  • newSlice
    Allocates a new slice with the given size.
  • readBytes
    Reads bytes bytes out of the pool starting at the given offset with the given length into the given
  • setBytesRef
    Fill the provided BytesRef with the bytes at the specified offset/length slice. This will avoid copy
  • readByte
    Read a single byte at the given offset.
  • setRawBytesRef
    Set the given BytesRef so that its content is equal to the ref.length bytes starting at offset. Most
  • copyFrom
  • copyFrom

Popular in Java

  • Running tasks concurrently on multiple threads
  • requestLocationUpdates (LocationManager)
  • onRequestPermissionsResult (Fragment)
  • notifyDataSetChanged (ArrayAdapter)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Menu (java.awt)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now