Class RefAdvertiser.PacketLineOutRefAdvertiser

java.lang.Object
org.eclipse.jgit.transport.RefAdvertiser
org.eclipse.jgit.transport.RefAdvertiser.PacketLineOutRefAdvertiser
Enclosing class:
RefAdvertiser

public static class RefAdvertiser.PacketLineOutRefAdvertiser extends RefAdvertiser
Advertiser which frames lines in a PacketLineOut format.
  • Field Details

  • Constructor Details

    • PacketLineOutRefAdvertiser

      public PacketLineOutRefAdvertiser(PacketLineOut out)
      Create a new advertiser for the supplied stream.
      Parameters:
      out - the output stream.
  • Method Details

    • advertiseId

      public void advertiseId(AnyObjectId id, String refName) throws IOException
      Description copied from class: RefAdvertiser
      Advertise one object under a specific name.

      If the advertised object is a tag, this method does not advertise the peeled version of it.

      Overrides:
      advertiseId in class RefAdvertiser
      Parameters:
      id - the object to advertise.
      refName - name of the reference to advertise the object as, can be any string not including the NUL byte.
      Throws:
      IOException - the underlying output stream failed to write out an advertisement record.
    • append

      private void append(String str) throws CharacterCodingException
      Throws:
      CharacterCodingException
    • append

      private void append(int b)
    • grow

      private void grow()
    • writeOne

      protected void writeOne(CharSequence line) throws IOException
      Description copied from class: RefAdvertiser
      Write a single advertisement line.
      Specified by:
      writeOne in class RefAdvertiser
      Parameters:
      line - the advertisement line to be written. The line always ends with LF. Never null or the empty string.
      Throws:
      IOException - the underlying output stream failed to write out an advertisement record.
    • end

      protected void end() throws IOException
      Description copied from class: RefAdvertiser
      Mark the end of the advertisements.
      Specified by:
      end in class RefAdvertiser
      Throws:
      IOException - the underlying output stream failed to write out an advertisement record.