public static class RefAdvertiser.PacketLineOutRefAdvertiser extends RefAdvertiser
PacketLineOut
format.RefAdvertiser.PacketLineOutRefAdvertiser
Constructor and Description |
---|
PacketLineOutRefAdvertiser(PacketLineOut out)
Create a new advertiser for the supplied stream.
|
Modifier and Type | Method and Description |
---|---|
void |
advertiseId(AnyObjectId id,
String refName)
Advertise one object under a specific name.
|
protected void |
end()
Mark the end of the advertisements.
|
protected void |
writeOne(CharSequence line)
Write a single advertisement line.
|
addSymref, advertiseCapability, advertiseCapability, advertiseHave, init, isEmpty, send, setDerefTags
public PacketLineOutRefAdvertiser(PacketLineOut out)
out
- the output stream.public void advertiseId(AnyObjectId id, String refName) throws IOException
RefAdvertiser
If the advertised object is a tag, this method does not advertise the peeled version of it.
advertiseId
in class RefAdvertiser
id
- the object to advertise.refName
- name of the reference to advertise the object as, can be any
string not including the NUL byte.IOException
- the underlying output stream failed to write out an
advertisement record.protected void writeOne(CharSequence line) throws IOException
RefAdvertiser
writeOne
in class RefAdvertiser
line
- the advertisement line to be written. The line always ends
with LF. Never null or the empty string.IOException
- the underlying output stream failed to write out an
advertisement record.protected void end() throws IOException
RefAdvertiser
end
in class RefAdvertiser
IOException
- the underlying output stream failed to write out an
advertisement record.Copyright © 2017 Eclipse JGit Project. All rights reserved.