congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ChunkIndex$Offset4
Code IndexAdd Tabnine to your IDE (free)

How to use
ChunkIndex$Offset4
in
org.eclipse.jgit.storage.dht

Best Java code snippets using org.eclipse.jgit.storage.dht.ChunkIndex$Offset4 (Showing top 2 results out of 315)

origin: org.eclipse.jgit/org.eclipse.jgit.storage.dht

static ChunkIndex fromBytes(ChunkKey key, byte[] index, int ptr, int len)
    throws DhtException {
  int v = index[ptr] & 0xff;
  switch (v) {
  case V1: {
    final int offsetFormat = index[ptr + 1] & 7;
    switch (offsetFormat) {
    case 1:
      return new Offset1(index, ptr, len, key);
    case 2:
      return new Offset2(index, ptr, len, key);
    case 3:
      return new Offset3(index, ptr, len, key);
    case 4:
      return new Offset4(index, ptr, len, key);
    default:
      throw new DhtException(MessageFormat.format(
          DhtText.get().unsupportedChunkIndex,
          Integer.toHexString(NB.decodeUInt16(index, ptr)), key));
    }
  }
  default:
    throw new DhtException(MessageFormat.format(
        DhtText.get().unsupportedChunkIndex,
        Integer.toHexString(v), key));
  }
}
origin: com.madgag/org.eclipse.jgit.storage.dht

static ChunkIndex fromBytes(ChunkKey key, byte[] index, int ptr, int len)
    throws DhtException {
  int v = index[ptr] & 0xff;
  switch (v) {
  case V1: {
    final int offsetFormat = index[ptr + 1] & 7;
    switch (offsetFormat) {
    case 1:
      return new Offset1(index, ptr, len, key);
    case 2:
      return new Offset2(index, ptr, len, key);
    case 3:
      return new Offset3(index, ptr, len, key);
    case 4:
      return new Offset4(index, ptr, len, key);
    default:
      throw new DhtException(MessageFormat.format(
          DhtText.get().unsupportedChunkIndex,
          Integer.toHexString(NB.decodeUInt16(index, ptr)), key));
    }
  }
  default:
    throw new DhtException(MessageFormat.format(
        DhtText.get().unsupportedChunkIndex,
        Integer.toHexString(v), key));
  }
}
org.eclipse.jgit.storage.dhtChunkIndex$Offset4

Most used methods

  • <init>

Popular in Java

  • Making http requests using okhttp
  • setContentView (Activity)
  • getApplicationContext (Context)
  • startActivity (Activity)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Top plugins for Android Studio
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