Codota Logo
ByteBufferUtil.toShort
Code IndexAdd Codota to your IDE (free)

How to use
toShort
method
in
org.apache.cassandra.utils.ByteBufferUtil

Best Java code snippets using org.apache.cassandra.utils.ByteBufferUtil.toShort (Showing top 9 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: org.apache.cassandra/cassandra-clientutil

public Short deserialize(ByteBuffer bytes)
{
  return bytes.remaining() == 0 ? null : ByteBufferUtil.toShort(bytes);
}
origin: org.apache.cassandra/cassandra-all

public Short deserialize(ByteBuffer bytes)
{
  return bytes.remaining() == 0 ? null : ByteBufferUtil.toShort(bytes);
}
origin: jsevellec/cassandra-unit

public Short deserialize(ByteBuffer bytes)
{
  return bytes.remaining() == 0 ? null : ByteBufferUtil.toShort(bytes);
}
origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra

public Short deserialize(ByteBuffer bytes)
{
  return bytes.remaining() == 0 ? null : ByteBufferUtil.toShort(bytes);
}
origin: com.strapdata.cassandra/cassandra-all

public Short deserialize(ByteBuffer bytes)
{
  return bytes.remaining() == 0 ? null : ByteBufferUtil.toShort(bytes);
}
origin: jsevellec/cassandra-unit

public ByteBuffer serializeForNativeProtocol(Iterator<Cell> cells, ProtocolVersion protocolVersion)
{
  assert isMultiCell;
  ByteBuffer[] components = new ByteBuffer[size()];
  short fieldPosition = 0;
  while (cells.hasNext())
  {
    Cell cell = cells.next();
    // handle null fields that aren't at the end
    short fieldPositionOfCell = ByteBufferUtil.toShort(cell.path().get(0));
    while (fieldPosition < fieldPositionOfCell)
      components[fieldPosition++] = null;
    components[fieldPosition++] = cell.value();
  }
  // append trailing nulls for missing cells
  while (fieldPosition < size())
    components[fieldPosition++] = null;
  return TupleType.buildValue(components);
}
origin: org.apache.cassandra/cassandra-all

public ByteBuffer serializeForNativeProtocol(Iterator<Cell> cells, ProtocolVersion protocolVersion)
{
  assert isMultiCell;
  ByteBuffer[] components = new ByteBuffer[size()];
  short fieldPosition = 0;
  while (cells.hasNext())
  {
    Cell cell = cells.next();
    // handle null fields that aren't at the end
    short fieldPositionOfCell = ByteBufferUtil.toShort(cell.path().get(0));
    while (fieldPosition < fieldPositionOfCell)
      components[fieldPosition++] = null;
    components[fieldPosition++] = cell.value();
  }
  // append trailing nulls for missing cells
  while (fieldPosition < size())
    components[fieldPosition++] = null;
  return TupleType.buildValue(components);
}
origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra

public ByteBuffer serializeForNativeProtocol(Iterator<Cell> cells, ProtocolVersion protocolVersion)
{
  assert isMultiCell;
  ByteBuffer[] components = new ByteBuffer[size()];
  short fieldPosition = 0;
  while (cells.hasNext())
  {
    Cell cell = cells.next();
    // handle null fields that aren't at the end
    short fieldPositionOfCell = ByteBufferUtil.toShort(cell.path().get(0));
    while (fieldPosition < fieldPositionOfCell)
      components[fieldPosition++] = null;
    components[fieldPosition++] = cell.value();
  }
  // append trailing nulls for missing cells
  while (fieldPosition < size())
    components[fieldPosition++] = null;
  return TupleType.buildValue(components);
}
origin: com.strapdata.cassandra/cassandra-all

public ByteBuffer serializeForNativeProtocol(Iterator<Cell> cells, ProtocolVersion protocolVersion)
{
  assert isMultiCell;
  ByteBuffer[] components = new ByteBuffer[size()];
  short fieldPosition = 0;
  while (cells.hasNext())
  {
    Cell cell = cells.next();
    // handle null fields that aren't at the end
    short fieldPositionOfCell = ByteBufferUtil.toShort(cell.path().get(0));
    while (fieldPosition < fieldPositionOfCell)
      components[fieldPosition++] = null;
    components[fieldPosition++] = cell.value();
  }
  // append trailing nulls for missing cells
  while (fieldPosition < size())
    components[fieldPosition++] = null;
  return TupleType.buildValue(components);
}
org.apache.cassandra.utilsByteBufferUtiltoShort

Javadoc

Convert a byte buffer to a short. Does not change the byte buffer position.

Popular methods of ByteBufferUtil

  • bytes
  • string
    Decode a String representation.
  • bytesToHex
  • getArray
    You should almost never use this. Instead, use the write* methods to avoid copies.
  • clone
  • hexToBytes
  • toFloat
  • toInt
    Convert a byte buffer to an integer. Does not change the byte buffer position.
  • toLong
  • toDouble
  • readBytes
  • arrayCopy
  • readBytes,
  • arrayCopy,
  • compareUnsigned,
  • read,
  • readShortLength,
  • compareSubArrays,
  • ensureCapacity,
  • getShortLength,
  • minimalBufferFor,
  • readBytesWithShortLength

Popular in Java

  • Making http post requests using okhttp
  • runOnUiThread (Activity)
  • addToBackStack (FragmentTransaction)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • JLabel (javax.swing)
  • JTable (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now