Tabnine Logo
DataUtils.readVarLong
Code IndexAdd Tabnine to your IDE (free)

How to use
readVarLong
method
in
org.h2.mvstore.DataUtils

Best Java code snippets using org.h2.mvstore.DataUtils.readVarLong (Showing top 20 results out of 315)

origin: com.h2database/h2

private static long readVarLong(ByteBuffer buff) {
  return DataUtils.readVarLong(buff);
}
origin: com.h2database/h2

@Override
public Object read(ByteBuffer buff, int tag) {
  switch (tag) {
  case TYPE_LONG:
    return DataUtils.readVarLong(buff);
  case TAG_LONG_NEGATIVE:
    return -DataUtils.readVarLong(buff);
  case TAG_LONG_FIXED:
    return buff.getLong();
  }
  return (long) (tag - TAG_LONG_0_7);
}
origin: com.h2database/h2

@Override
public Object read(ByteBuffer buff, int tag) {
  switch (tag) {
  case TAG_DOUBLE_0:
    return 0d;
  case TAG_DOUBLE_1:
    return 1d;
  case TAG_DOUBLE_FIXED:
    return buff.getDouble();
  }
  return Double.longBitsToDouble(Long.reverse(DataUtils
      .readVarLong(buff)));
}
origin: com.h2database/h2

@Override
public Object read(ByteBuffer buff) {
  long operationId = DataUtils.readVarLong(buff);
  Object value;
  if (buff.get() == 1) {
    value = valueType.read(buff);
  } else {
    value = null;
  }
  return new VersionedValue(operationId, value);
}
origin: com.h2database/h2

@Override
public Object read(ByteBuffer buff, int tag) {
  switch (tag) {
  case TAG_BIG_INTEGER_0:
    return BigInteger.ZERO;
  case TAG_BIG_INTEGER_1:
    return BigInteger.ONE;
  case TAG_BIG_INTEGER_SMALL:
    return BigInteger.valueOf(DataUtils.readVarLong(buff));
  }
  int len = DataUtils.readVarInt(buff);
  byte[] bytes = Utils.newBytes(len);
  buff.get(bytes);
  return new BigInteger(bytes);
}
origin: com.h2database/h2

@Override
public Object read(ByteBuffer buff) {
  int flags = DataUtils.readVarInt(buff);
  if (flags == -1) {
    long id = DataUtils.readVarLong(buff);
    return new SpatialKey(id);
  }
  float[] minMax = new float[dimensions * 2];
  for (int i = 0; i < dimensions; i++) {
    float min = buff.getFloat();
    float max;
    if ((flags & (1 << i)) != 0) {
      max = min;
    } else {
      max = buff.getFloat();
    }
    minMax[i + i] = min;
    minMax[i + i + 1] = max;
  }
  long id = DataUtils.readVarLong(buff);
  return new SpatialKey(id, minMax);
}
origin: com.h2database/h2

  DataUtils.readVarLong(idBuffer);
  break;
case 2:
  length += DataUtils.readVarLong(idBuffer);
  DataUtils.readVarLong(idBuffer);
  break;
default:
origin: com.h2database/h2

@Override
public Object read(ByteBuffer buff, int tag) {
  switch (tag) {
  case TAG_BIG_DECIMAL_0:
    return BigDecimal.ZERO;
  case TAG_BIG_DECIMAL_1:
    return BigDecimal.ONE;
  case TAG_BIG_DECIMAL_SMALL:
    return BigDecimal.valueOf(DataUtils.readVarLong(buff));
  case TAG_BIG_DECIMAL_SMALL_SCALED:
    int scale = DataUtils.readVarInt(buff);
    return BigDecimal.valueOf(DataUtils.readVarLong(buff), scale);
  }
  int scale = DataUtils.readVarInt(buff);
  int len = DataUtils.readVarInt(buff);
  byte[] bytes = Utils.newBytes(len);
  buff.get(bytes);
  BigInteger b = new BigInteger(bytes);
  return new BigDecimal(b, scale);
}
origin: com.h2database/h2

  long k = DataUtils.readVarLong(idBuffer);
  map.remove(k);
  break;
case 2:
  DataUtils.readVarLong(idBuffer);
  long k2 = DataUtils.readVarLong(idBuffer);
origin: com.h2database/h2

block = DataUtils.readVarLong(idBuffer);
buff.append("block ").append(block).append(" len=").append(len);
break;
length += DataUtils.readVarLong(idBuffer);
block = DataUtils.readVarLong(idBuffer);
buff.append("indirect block ").append(block).append(" len=").append(len);
break;
origin: com.h2database/h2

  long k = DataUtils.readVarLong(idBuffer);
  maxKey = Math.max(maxKey, k);
  break;
case 2:
  DataUtils.readVarLong(idBuffer);
  long k2 = DataUtils.readVarLong(idBuffer);
  maxKey = k2;
  byte[] r = map.get(k2);
origin: com.h2database/h2

long key = DataUtils.readVarLong(idBuffer);
if (skip >= len) {
  skip -= len;
long len = DataUtils.readVarLong(idBuffer);
long key = DataUtils.readVarLong(idBuffer);
if (skip >= len) {
  skip -= len;
origin: com.h2database/h2

long s = DataUtils.readVarLong(chunk);
counts[i] = s;
origin: com.h2database/h2

long s = DataUtils.readVarLong(buff);
total += s;
children[i] = new PageReference(null, p[i], s);
origin: com.h2database/h2-mvstore

@Override
public Object read(ByteBuffer buff, int tag) {
  switch (tag) {
  case TYPE_LONG:
    return DataUtils.readVarLong(buff);
  case TAG_LONG_NEGATIVE:
    return -DataUtils.readVarLong(buff);
  case TAG_LONG_FIXED:
    return buff.getLong();
  }
  return (long) (tag - TAG_LONG_0_7);
}
origin: com.eventsourcing/h2

@Override
public Object read(ByteBuffer buff, int tag) {
  switch (tag) {
  case TYPE_LONG:
    return DataUtils.readVarLong(buff);
  case TAG_LONG_NEGATIVE:
    return -DataUtils.readVarLong(buff);
  case TAG_LONG_FIXED:
    return buff.getLong();
  }
  return Long.valueOf(tag - TAG_LONG_0_7);
}
origin: org.wowtools/h2

@Override
public Object read(ByteBuffer buff, int tag) {
  switch (tag) {
  case TYPE_LONG:
    return DataUtils.readVarLong(buff);
  case TAG_LONG_NEGATIVE:
    return -DataUtils.readVarLong(buff);
  case TAG_LONG_FIXED:
    return buff.getLong();
  }
  return Long.valueOf(tag - TAG_LONG_0_7);
}
origin: com.h2database/h2-mvstore

@Override
public Object read(ByteBuffer buff, int tag) {
  switch (tag) {
  case TAG_DOUBLE_0:
    return 0d;
  case TAG_DOUBLE_1:
    return 1d;
  case TAG_DOUBLE_FIXED:
    return buff.getDouble();
  }
  return Double.longBitsToDouble(Long.reverse(DataUtils
      .readVarLong(buff)));
}
origin: org.wowtools/h2

@Override
public Object read(ByteBuffer buff) {
  VersionedValue v = new VersionedValue();
  v.operationId = DataUtils.readVarLong(buff);
  if (buff.get() == 1) {
    v.value = valueType.read(buff);
  }
  return v;
}
origin: com.eventsourcing/h2

@Override
public Object read(ByteBuffer buff) {
  VersionedValue v = new VersionedValue();
  v.operationId = DataUtils.readVarLong(buff);
  if (buff.get() == 1) {
    v.value = valueType.read(buff);
  }
  return v;
}
org.h2.mvstoreDataUtilsreadVarLong

Javadoc

Read a variable size long.

Popular methods of DataUtils

  • readVarInt
    Read a variable size int.
  • appendMap
    Append a map to the string builder, sorted by key.
  • checkArgument
    Throw an IllegalArgumentException if the argument is invalid.
  • copyExcept
    Copy the elements of an array, and remove one element.
  • copyWithGap
    Copy the elements of an array, with a gap.
  • encodeLength
    Convert the length to a length code 0..31. 31 means more than 1 MB.
  • formatMessage
    Format an error message.
  • getCheckValue
    Calculate a check value for the given integer. A check value is mean to verify the data is consisten
  • getErrorCode
    Get the error code from an exception message.
  • getFletcher32
    Calculate the Fletcher32 checksum.
  • getPageChunkId
    Get the chunk id from the position.
  • getPageMaxLength
    Get the maximum length for the given code. For the code 31, PAGE_LARGE is returned.
  • getPageChunkId,
  • getPageMaxLength,
  • getPageOffset,
  • getPagePos,
  • getPageType,
  • getVarIntLen,
  • initCause,
  • newIllegalArgumentException,
  • newIllegalStateException,
  • newUnsupportedOperationException

Popular in Java

  • Reading from database using SQL prepared statement
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (Timer)
  • getExternalFilesDir (Context)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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