Package org.bouncycastle.tls
Class HeartbeatMessage
java.lang.Object
org.bouncycastle.tls.HeartbeatMessage
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HeartbeatMessagecreate(TlsContext context, short type, byte[] payload) static HeartbeatMessagecreate(TlsContext context, short type, byte[] payload, int paddingLength) voidencode(OutputStream output) Encode thisHeartbeatMessageto anOutputStream.intbyte[]shortgetType()static HeartbeatMessageparse(InputStream input) Parse aHeartbeatMessagefrom anInputStream.
-
Field Details
-
type
protected short type -
payload
protected byte[] payload -
padding
protected byte[] padding
-
-
Constructor Details
-
HeartbeatMessage
public HeartbeatMessage(short type, byte[] payload, byte[] padding)
-
-
Method Details
-
create
-
create
public static HeartbeatMessage create(TlsContext context, short type, byte[] payload, int paddingLength) -
getPaddingLength
public int getPaddingLength() -
getPayload
public byte[] getPayload() -
getType
public short getType() -
encode
Encode thisHeartbeatMessageto anOutputStream.- Parameters:
output- theOutputStreamto encode to.- Throws:
IOException
-
parse
Parse aHeartbeatMessagefrom anInputStream.- Parameters:
input- theInputStreamto parse from.- Returns:
- a
HeartbeatMessageobject. - Throws:
IOException
-