Codota Logo
GitStore$ChunkMeta.getFragment
Code IndexAdd Codota to your IDE (free)

How to use
getFragment
method
in
org.eclipse.jgit.generated.storage.dht.proto.GitStore$ChunkMeta

Best Java code snippets using org.eclipse.jgit.generated.storage.dht.proto.GitStore$ChunkMeta.getFragment (Showing top 12 results out of 315)

  • Common ways to obtain GitStore$ChunkMeta
private void myMethod () {
GitStore$ChunkMeta g =
  • Codota IconGitStore.ChunkMeta$Builder gitStoreChunkMeta$Builder;gitStoreChunkMeta$Builder.build()
  • Smart code suggestions by Codota
}
origin: org.eclipse.jgit/org.eclipse.jgit.storage.dht

@Override
public ObjectStream openStream() throws MissingObjectException, IOException {
  PackChunk pc = firstChunk;
  if (pc != null)
    firstChunk = null;
  else
    pc = ctx.getChunk(ChunkKey.fromString(meta.getFragment(0)));
  InputStream in = new ChunkInputStream(meta, ctx, pos, pc);
  in = new BufferedInputStream(new InflaterInputStream(in), 8192);
  return new ObjectStream.Filter(type, sz, in);
}
origin: com.madgag/org.eclipse.jgit.storage.dht

@Override
public ObjectStream openStream() throws MissingObjectException, IOException {
  PackChunk pc = firstChunk;
  if (pc != null)
    firstChunk = null;
  else
    pc = ctx.getChunk(ChunkKey.fromString(meta.getFragment(0)));
  InputStream in = new ChunkInputStream(meta, ctx, pos, pc);
  in = new BufferedInputStream(new InflaterInputStream(in), 8192);
  return new ObjectStream.Filter(type, sz, in);
}
origin: com.madgag/org.eclipse.jgit.storage.dht

if (meta != null) {
  for (int i = 1; i < meta.getFragmentCount(); i++)
    keys.add(ChunkKey.fromString(meta.getFragment(i)));
origin: org.eclipse.jgit/org.eclipse.jgit.storage.dht

static ChunkKey getNextFragment(ChunkMeta meta, ChunkKey chunkKey) {
  int cnt = meta.getFragmentCount();
  for (int i = 0; i < cnt - 1; i++) {
    ChunkKey key = ChunkKey.fromString(meta.getFragment(i));
    if (chunkKey.equals(key))
      return ChunkKey.fromString(meta.getFragment(i + 1));
  }
  return null;
}
origin: org.eclipse.jgit/org.eclipse.jgit.storage.dht

@Override
public int read(byte[] dstbuf, int dstptr, int dstlen)
    throws IOException {
  if (0 == dstlen)
    return 0;
  int n = pc.read(ptr, dstbuf, dstptr, dstlen);
  if (n == 0) {
    if (fragment == meta.getFragmentCount())
      return -1;
    pc = ctx.getChunk(ChunkKey.fromString(
        meta.getFragment(++fragment)));
    ptr = 0;
    n = pc.read(ptr, dstbuf, dstptr, dstlen);
    if (n == 0)
      return -1;
  }
  ptr += n;
  return n;
}
origin: com.madgag/org.eclipse.jgit.storage.dht

@Override
public int read(byte[] dstbuf, int dstptr, int dstlen)
    throws IOException {
  if (0 == dstlen)
    return 0;
  int n = pc.read(ptr, dstbuf, dstptr, dstlen);
  if (n == 0) {
    if (fragment == meta.getFragmentCount())
      return -1;
    pc = ctx.getChunk(ChunkKey.fromString(
        meta.getFragment(++fragment)));
    ptr = 0;
    n = pc.read(ptr, dstbuf, dstptr, dstlen);
    if (n == 0)
      return -1;
  }
  ptr += n;
  return n;
}
origin: com.madgag/org.eclipse.jgit.storage.dht

static ChunkKey getNextFragment(ChunkMeta meta, ChunkKey chunkKey) {
  int cnt = meta.getFragmentCount();
  for (int i = 0; i < cnt - 1; i++) {
    ChunkKey key = ChunkKey.fromString(meta.getFragment(i));
    if (chunkKey.equals(key))
      return ChunkKey.fromString(meta.getFragment(i + 1));
  }
  return null;
}
origin: org.eclipse.jgit/org.eclipse.jgit.storage.dht

      break;
    pc = reader.getChunk(ChunkKey.fromString(
        meta.getFragment(nextChunk++)));
    if (meta.getFragmentCount() == nextChunk)
throw new DataFormatException(MessageFormat.format(
    DhtText.get().shortCompressedObject,
    ChunkKey.fromString(meta.getFragment(0)),
    Integer.valueOf(pos)));
origin: com.madgag/org.eclipse.jgit.storage.dht

      break;
    pc = reader.getChunk(ChunkKey.fromString(
        meta.getFragment(nextChunk++)));
    if (meta.getFragmentCount() == nextChunk)
throw new DataFormatException(MessageFormat.format(
    DhtText.get().shortCompressedObject,
    ChunkKey.fromString(meta.getFragment(0)),
    Integer.valueOf(pos)));
origin: org.eclipse.jgit/org.eclipse.jgit.storage.dht

if (meta != null) {
  for (int i = 1; i < meta.getFragmentCount(); i++)
    keys.add(ChunkKey.fromString(meta.getFragment(i)));
origin: org.eclipse.jgit/org.eclipse.jgit.storage.dht

for (int fragId = 1; fragId < cnt; fragId++) {
  PackChunk pc = ctx.getChunk(ChunkKey.fromString(
      meta.getFragment(fragId)));
  pc.copyEntireChunkAsIs(out, obj, validate);
origin: com.madgag/org.eclipse.jgit.storage.dht

for (int fragId = 1; fragId < cnt; fragId++) {
  PackChunk pc = ctx.getChunk(ChunkKey.fromString(
      meta.getFragment(fragId)));
  pc.copyEntireChunkAsIs(out, obj, validate);
org.eclipse.jgit.generated.storage.dht.protoGitStore$ChunkMetagetFragment

Popular methods of GitStore$ChunkMeta

  • getBaseChunkCount
  • getBaseChunkList
  • getCommitPrefetch
  • getFragmentCount
  • getSerializedSize
  • getTreePrefetch
  • newBuilder
  • <init>
  • equals
  • getBaseChunk
  • getDefaultInstance
  • getDescriptor
  • getDefaultInstance,
  • getDescriptor,
  • getDescriptorForType,
  • getFragmentList,
  • getUnknownFields,
  • hasCommitPrefetch,
  • hasTreePrefetch,
  • hashCode,
  • isInitialized

Popular in Java

  • Making http requests using okhttp
  • getResourceAsStream (ClassLoader)
  • findViewById (Activity)
  • getSharedPreferences (Context)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
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