Package org.bouncycastle.tls
Class HeartbeatMessage
java.lang.Object
org.bouncycastle.tls.HeartbeatMessage
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic HeartbeatMessage
create
(TlsContext context, short type, byte[] payload) static HeartbeatMessage
create
(TlsContext context, short type, byte[] payload, int paddingLength) void
encode
(OutputStream output) Encode thisHeartbeatMessage
to anOutputStream
.int
byte[]
short
getType()
static HeartbeatMessage
parse
(InputStream input) Parse aHeartbeatMessage
from 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 thisHeartbeatMessage
to anOutputStream
.- Parameters:
output
- theOutputStream
to encode to.- Throws:
IOException
-
parse
Parse aHeartbeatMessage
from anInputStream
.- Parameters:
input
- theInputStream
to parse from.- Returns:
- a
HeartbeatMessage
object. - Throws:
IOException
-