Tabnine Logo
PackOutputStream.write
Code IndexAdd Tabnine to your IDE (free)

How to use
write
method
in
org.eclipse.jgit.internal.storage.pack.PackOutputStream

Best Java code snippets using org.eclipse.jgit.internal.storage.pack.PackOutputStream.write (Showing top 20 results out of 315)

origin: org.eclipse.jgit/org.eclipse.jgit

void write(PackOutputStream out, long pos, int cnt)
    throws IOException {
  out.write(block, (int) (pos - start), cnt);
}
origin: org.eclipse.jgit/org.eclipse.jgit

private void writeDeltaObjectDeflate(PackOutputStream out,
    final ObjectToPack otp) throws IOException {
  writeBase(out, otp.getDeltaBase());
  crc32.reset();
  otp.setOffset(out.length());
  DeltaCache.Ref ref = otp.popCachedDelta();
  if (ref != null) {
    byte[] zbuf = ref.get();
    if (zbuf != null) {
      out.writeHeader(otp, otp.getCachedSize());
      out.write(zbuf);
      typeStats.cntDeltas++;
      typeStats.deltaBytes += out.length() - otp.getOffset();
      return;
    }
  }
  try (TemporaryBuffer.Heap delta = delta(otp)) {
    out.writeHeader(otp, delta.length());
    Deflater deflater = deflater();
    deflater.reset();
    DeflaterOutputStream dst = new DeflaterOutputStream(out, deflater);
    delta.writeTo(dst, null);
    dst.finish();
  }
  typeStats.cntDeltas++;
  typeStats.deltaBytes += out.length() - otp.getOffset();
}
origin: org.eclipse.jgit/org.eclipse.jgit

@Override
void write(PackOutputStream out, long pos, int cnt)
    throws IOException {
  int ptr = (int) (pos - start);
  out.write(array, ptr, cnt);
}
origin: org.eclipse.jgit/org.eclipse.jgit

  out.write(buf, 0, (int) dataLength);
} else {
      crc2.update(buf, 0, n);
    out.write(buf, 0, n);
    pos += n;
    cnt -= n;
origin: org.eclipse.jgit/org.eclipse.jgit

@Override
void write(PackOutputStream out, long pos, int cnt)
    throws IOException {
  final ByteBuffer s = buffer.slice();
  s.position((int) (pos - start));
  while (0 < cnt) {
    byte[] buf = out.getCopyBuffer();
    int n = Math.min(cnt, buf.length);
    s.get(buf, 0, n);
    out.write(buf, 0, n);
    cnt -= n;
  }
}
origin: org.eclipse.jgit/org.eclipse.jgit

  out.write(buf, 0, (int) dataLength);
} else {
      crc2.update(buf, 0, n);
    out.write(buf, 0, n);
    pos += n;
    cnt -= n;
origin: org.eclipse.jgit/org.eclipse.jgit

private void writeChecksum(PackOutputStream out) throws IOException {
  packcsum = out.getDigest();
  out.write(packcsum);
}
origin: org.eclipse.jgit/org.eclipse.jgit

final void writeFileHeader(int version, long objectCount)
    throws IOException {
  System.arraycopy(PACK_SIGNATURE, 0, headerBuffer, 0, 4);
  NB.encodeInt32(headerBuffer, 4, version);
  NB.encodeInt32(headerBuffer, 8, (int) objectCount);
  write(headerBuffer, 0, 12);
  ofsDelta = packWriter.isDeltaBaseAsOffset();
}
origin: org.eclipse.jgit/org.eclipse.jgit

  int n = objectHeader(rawLength, OBJ_OFS_DELTA, headerBuffer);
  n = ofsDelta(count - b.getOffset(), headerBuffer, n);
  write(headerBuffer, 0, n);
} else if (otp.isDeltaRepresentation()) {
  int n = objectHeader(rawLength, OBJ_REF_DELTA, headerBuffer);
  otp.getDeltaBaseId().copyRawTo(headerBuffer, n);
  write(headerBuffer, 0, n + 20);
} else {
  int n = objectHeader(rawLength, otp.getType(), headerBuffer);
  write(headerBuffer, 0, n);
origin: org.eclipse.jgit/org.eclipse.jgit

  out.write(buf.array(), 12, n - 12);
  packHeadSkipped = true;
} else {
  out.write(buf.array(), 0, n);
origin: berlam/github-bucket

@Override
void write(PackOutputStream out, long pos, int cnt)
    throws IOException {
  int ptr = (int) (pos - start);
  out.write(array, ptr, cnt);
}
origin: sonia.jgit/org.eclipse.jgit

@Override
void write(PackOutputStream out, long pos, int cnt)
    throws IOException {
  int ptr = (int) (pos - start);
  out.write(array, ptr, cnt);
}
origin: berlam/github-bucket

void write(PackOutputStream out, long pos, int cnt)
    throws IOException {
  out.write(block, (int) (pos - start), cnt);
}
origin: sonia.jgit/org.eclipse.jgit

void write(PackOutputStream out, long pos, int cnt)
    throws IOException {
  out.write(block, (int) (pos - start), cnt);
}
origin: sonia.jgit/org.eclipse.jgit

@Override
void write(PackOutputStream out, long pos, int cnt)
    throws IOException {
  final ByteBuffer s = buffer.slice();
  s.position((int) (pos - start));
  while (0 < cnt) {
    byte[] buf = out.getCopyBuffer();
    int n = Math.min(cnt, buf.length);
    s.get(buf, 0, n);
    out.write(buf, 0, n);
    cnt -= n;
  }
}
origin: berlam/github-bucket

private void writeChecksum(PackOutputStream out) throws IOException {
  packcsum = out.getDigest();
  out.write(packcsum);
}
origin: sonia.jgit/org.eclipse.jgit

private void writeChecksum(PackOutputStream out) throws IOException {
  packcsum = out.getDigest();
  out.write(packcsum);
}
origin: berlam/github-bucket

@Override
void write(PackOutputStream out, long pos, int cnt)
    throws IOException {
  final ByteBuffer s = buffer.slice();
  s.position((int) (pos - start));
  while (0 < cnt) {
    byte[] buf = out.getCopyBuffer();
    int n = Math.min(cnt, buf.length);
    s.get(buf, 0, n);
    out.write(buf, 0, n);
    cnt -= n;
  }
}
origin: sonia.jgit/org.eclipse.jgit

final void writeFileHeader(int version, long objectCount)
    throws IOException {
  System.arraycopy(PACK_SIGNATURE, 0, headerBuffer, 0, 4);
  NB.encodeInt32(headerBuffer, 4, version);
  NB.encodeInt32(headerBuffer, 8, (int) objectCount);
  write(headerBuffer, 0, 12);
  ofsDelta = packWriter.isDeltaBaseAsOffset();
}
origin: berlam/github-bucket

final void writeFileHeader(int version, long objectCount)
    throws IOException {
  System.arraycopy(PACK_SIGNATURE, 0, headerBuffer, 0, 4);
  NB.encodeInt32(headerBuffer, 4, version);
  NB.encodeInt32(headerBuffer, 8, (int) objectCount);
  write(headerBuffer, 0, 12);
  ofsDelta = packWriter.isDeltaBaseAsOffset();
}
org.eclipse.jgit.internal.storage.packPackOutputStreamwrite

Javadoc

Popular methods of PackOutputStream

  • <init>
    Initialize a pack output stream. This constructor is exposed to support debugging the JGit library o
  • endObject
  • flush
  • getCopyBuffer
  • getDigest
  • length
  • objectHeader
  • ofsDelta
  • ofsDeltaVarIntLength
  • writeFileHeader
  • writeHeader
    Commits the object header onto the stream. Once the header has been written, the object representati
  • writeObject
    Write one object. If the object was already written, this method does nothing and returns quickly. T
  • writeHeader,
  • writeObject

Popular in Java

  • Making http post requests using okhttp
  • runOnUiThread (Activity)
  • setRequestProperty (URLConnection)
  • setContentView (Activity)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Top plugins for WebStorm
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