congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
PackOutputStream.length
Code IndexAdd Tabnine to your IDE (free)

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

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

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

private void writeObjects(PackOutputStream out, List<ObjectToPack> list)
    throws IOException {
  if (list.isEmpty())
    return;
  typeStats = stats.objectTypes[list.get(0).getType()];
  long beginOffset = out.length();
  if (reuseSupport != null) {
    reuseSupport.writeObjects(out, list);
  } else {
    for (ObjectToPack otp : list)
      out.writeObject(otp);
  }
  typeStats.bytes += out.length() - beginOffset;
  typeStats.cntObjects = list.size();
}
origin: org.eclipse.jgit/org.eclipse.jgit

private void writeWholeObjectDeflate(PackOutputStream out,
    final ObjectToPack otp) throws IOException {
  final Deflater deflater = deflater();
  final ObjectLoader ldr = reader.open(otp, otp.getType());
  crc32.reset();
  otp.setOffset(out.length());
  out.writeHeader(otp, ldr.getSize());
  deflater.reset();
  DeflaterOutputStream dst = new DeflaterOutputStream(out, deflater);
  ldr.copyTo(dst);
  dst.finish();
}
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

otp.setOffset(out.length());
try {
  reuseSupport.copyObjectAsIs(out, otp, reuseValidate);
  if (otp.isDeltaRepresentation()) {
    typeStats.reusedDeltas++;
    typeStats.deltaBytes += out.length() - otp.getOffset();
  if (otp.getOffset() == out.length()) {
    otp.setOffset(0);
    otp.clearDeltaBase();
origin: org.eclipse.jgit/org.eclipse.jgit

stats.totalBytes = out.length();
reader.close();
endPhase(writeMonitor);
origin: sonia.jgit/org.eclipse.jgit

private void writeObjects(PackOutputStream out, List<ObjectToPack> list)
    throws IOException {
  if (list.isEmpty())
    return;
  typeStats = stats.objectTypes[list.get(0).getType()];
  long beginOffset = out.length();
  if (reuseSupport != null) {
    reuseSupport.writeObjects(out, list);
  } else {
    for (ObjectToPack otp : list)
      out.writeObject(otp);
  }
  typeStats.bytes += out.length() - beginOffset;
  typeStats.cntObjects = list.size();
}
origin: berlam/github-bucket

private void writeObjects(PackOutputStream out, List<ObjectToPack> list)
    throws IOException {
  if (list.isEmpty())
    return;
  typeStats = stats.objectTypes[list.get(0).getType()];
  long beginOffset = out.length();
  if (reuseSupport != null) {
    reuseSupport.writeObjects(out, list);
  } else {
    for (ObjectToPack otp : list)
      out.writeObject(otp);
  }
  typeStats.bytes += out.length() - beginOffset;
  typeStats.cntObjects = list.size();
}
origin: sonia.jgit/org.eclipse.jgit

private void writeWholeObjectDeflate(PackOutputStream out,
    final ObjectToPack otp) throws IOException {
  final Deflater deflater = deflater();
  final ObjectLoader ldr = reader.open(otp, otp.getType());
  crc32.reset();
  otp.setOffset(out.length());
  out.writeHeader(otp, ldr.getSize());
  deflater.reset();
  DeflaterOutputStream dst = new DeflaterOutputStream(out, deflater);
  ldr.copyTo(dst);
  dst.finish();
}
origin: berlam/github-bucket

private void writeWholeObjectDeflate(PackOutputStream out,
    final ObjectToPack otp) throws IOException {
  final Deflater deflater = deflater();
  final ObjectLoader ldr = reader.open(otp, otp.getType());
  crc32.reset();
  otp.setOffset(out.length());
  out.writeHeader(otp, ldr.getSize());
  deflater.reset();
  DeflaterOutputStream dst = new DeflaterOutputStream(out, deflater);
  ldr.copyTo(dst);
  dst.finish();
}
origin: sonia.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;
    }
  }
  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: berlam/github-bucket

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: sonia.jgit/org.eclipse.jgit

otp.setOffset(out.length());
try {
  reuseSupport.copyObjectAsIs(out, otp, reuseValidate);
  if (otp.isDeltaRepresentation()) {
    typeStats.reusedDeltas++;
    typeStats.deltaBytes += out.length() - otp.getOffset();
  if (otp.getOffset() == out.length()) {
    otp.setOffset(0);
    otp.clearDeltaBase();
origin: berlam/github-bucket

otp.setOffset(out.length());
try {
  reuseSupport.copyObjectAsIs(out, otp, reuseValidate);
  if (otp.isDeltaRepresentation()) {
    typeStats.reusedDeltas++;
    typeStats.deltaBytes += out.length() - otp.getOffset();
  if (otp.getOffset() == out.length()) {
    otp.setOffset(0);
    otp.clearDeltaBase();
origin: berlam/github-bucket

stats.totalBytes = out.length();
reader.close();
endPhase(writeMonitor);
origin: sonia.jgit/org.eclipse.jgit

stats.totalBytes = out.length();
reader.close();
endPhase(writeMonitor);
org.eclipse.jgit.internal.storage.packPackOutputStreamlength

Javadoc

Get total number of bytes written since stream start.

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
  • objectHeader
  • ofsDelta
  • ofsDeltaVarIntLength
  • write
  • 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

  • Parsing JSON documents to java classes using gson
  • compareTo (BigDecimal)
  • requestLocationUpdates (LocationManager)
  • startActivity (Activity)
  • String (java.lang)
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JTable (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • 21 Best IntelliJ Plugins
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