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
Advertiser which frames lines in a
PacketLineOut
format.-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jgit.transport.RefAdvertiser
RefAdvertiser.PacketLineOutRefAdvertiser
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byte[]
private ByteBuffer
private char[]
private CharBuffer
private final PacketLineOut
private final CharsetEncoder
Fields inherited from class org.eclipse.jgit.transport.RefAdvertiser
capablities, first
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new advertiser for the supplied stream. -
Method Summary
Modifier and TypeMethodDescriptionvoid
advertiseId
(AnyObjectId id, String refName) Advertise one object under a specific name.private void
append
(int b) private void
protected void
end()
Mark the end of the advertisements.private void
grow()
protected void
writeOne
(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 Details
-
utf8
-
pckOut
-
binArr
private byte[] binArr -
binBuf
-
chArr
private char[] chArr -
chBuf
-
-
Constructor Details
-
PacketLineOutRefAdvertiser
Create a new advertiser for the supplied stream.- Parameters:
out
- the output stream.
-
-
Method Details
-
advertiseId
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:
IOException
- the underlying output stream failed to write out an advertisement record.
-
append
- Throws:
CharacterCodingException
-
append
private void append(int b) -
grow
private void grow() -
writeOne
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:
IOException
- the underlying output stream failed to write out an advertisement record.
-
end
Description copied from class:RefAdvertiser
Mark the end of the advertisements.- Specified by:
end
in classRefAdvertiser
- Throws:
IOException
- the underlying output stream failed to write out an advertisement record.
-