Module org.eclipse.jgit
Package org.eclipse.jgit.transport
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 aPacketLineOutformat.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jgit.transport.RefAdvertiser
RefAdvertiser.PacketLineOutRefAdvertiser
-
-
Constructor Summary
Constructors Constructor Description PacketLineOutRefAdvertiser(PacketLineOut out)Create a new advertiser for the supplied stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadvertiseId(AnyObjectId id, String refName)Advertise one object under a specific name.protected voidend()Mark the end of the advertisements.protected voidwriteOne(CharSequence line)Write a single advertisement line.-
Methods inherited from class org.eclipse.jgit.transport.RefAdvertiser
addSymref, advertiseCapability, advertiseCapability, advertiseHave, init, isEmpty, send, send, setDerefTags, setUseProtocolV2
-
-
-
-
Constructor Detail
-
PacketLineOutRefAdvertiser
public PacketLineOutRefAdvertiser(PacketLineOut out)
Create a new advertiser for the supplied stream.- Parameters:
out- the output stream.
-
-
Method Detail
-
advertiseId
public void advertiseId(AnyObjectId id, String refName) throws IOException
Description copied from class:RefAdvertiserAdvertise one object under a specific name.If the advertised object is a tag, this method does not advertise the peeled version of it.
- Overrides:
advertiseIdin classRefAdvertiser- 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.
-
writeOne
protected void writeOne(CharSequence line) throws IOException
Description copied from class:RefAdvertiserWrite a single advertisement line.- Specified by:
writeOnein classRefAdvertiser- 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 IOExceptionDescription copied from class:RefAdvertiserMark the end of the advertisements.- Specified by:
endin classRefAdvertiser- Throws:
IOException- the underlying output stream failed to write out an advertisement record.
-
-