Codota Logo
ChunkIndex$Offset3
Code IndexAdd Codota to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
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$Offset3

Most used methods

  • <init>

Popular in Java

  • Running tasks concurrently on multiple threads
  • setContentView (Activity)
  • getContentResolver (Context)
  • findViewById (Activity)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
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