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 aPacketLineOut
format.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jgit.transport.RefAdvertiser
RefAdvertiser.PacketLineOutRefAdvertiser
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]
binArr
private java.nio.ByteBuffer
binBuf
private char[]
chArr
private java.nio.CharBuffer
chBuf
private PacketLineOut
pckOut
private java.nio.charset.CharsetEncoder
utf8
-
Fields inherited from class org.eclipse.jgit.transport.RefAdvertiser
capablities, first
-
-
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 void
advertiseId(AnyObjectId id, java.lang.String refName)
Advertise one object under a specific name.private void
append(int b)
private void
append(java.lang.String str)
protected void
end()
Mark the end of the advertisements.private void
grow()
protected void
writeOne(java.lang.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
-
-
-
-
Field Detail
-
utf8
private final java.nio.charset.CharsetEncoder utf8
-
pckOut
private final PacketLineOut pckOut
-
binArr
private byte[] binArr
-
binBuf
private java.nio.ByteBuffer binBuf
-
chArr
private char[] chArr
-
chBuf
private java.nio.CharBuffer chBuf
-
-
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, java.lang.String refName) throws java.io.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 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:
java.io.IOException
- the underlying output stream failed to write out an advertisement record.
-
append
private void append(java.lang.String str) throws java.nio.charset.CharacterCodingException
- Throws:
java.nio.charset.CharacterCodingException
-
append
private void append(int b)
-
grow
private void grow()
-
writeOne
protected void writeOne(java.lang.CharSequence line) throws java.io.IOException
Description copied from class:RefAdvertiser
Write a single advertisement line.- Specified by:
writeOne
in classRefAdvertiser
- Parameters:
line
- the advertisement line to be written. The line always ends with LF. Never null or the empty string.- Throws:
java.io.IOException
- the underlying output stream failed to write out an advertisement record.
-
end
protected void end() throws java.io.IOException
Description copied from class:RefAdvertiser
Mark the end of the advertisements.- Specified by:
end
in classRefAdvertiser
- Throws:
java.io.IOException
- the underlying output stream failed to write out an advertisement record.
-
-