Package org.bouncycastle.tls
Class HeartbeatMessage
- java.lang.Object
-
- org.bouncycastle.tls.HeartbeatMessage
-
public class HeartbeatMessage extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description HeartbeatMessage(short type, byte[] payload, byte[] padding)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HeartbeatMessagecreate(TlsContext context, short type, byte[] payload)static HeartbeatMessagecreate(TlsContext context, short type, byte[] payload, int paddingLength)voidencode(java.io.OutputStream output)Encode thisHeartbeatMessageto anOutputStream.intgetPaddingLength()byte[]getPayload()shortgetType()static HeartbeatMessageparse(java.io.InputStream input)Parse aHeartbeatMessagefrom anInputStream.
-
-
-
Method Detail
-
create
public static HeartbeatMessage create(TlsContext context, short type, byte[] payload)
-
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
public void encode(java.io.OutputStream output) throws java.io.IOExceptionEncode thisHeartbeatMessageto anOutputStream.- Parameters:
output- theOutputStreamto encode to.- Throws:
java.io.IOException
-
parse
public static HeartbeatMessage parse(java.io.InputStream input) throws java.io.IOException
Parse aHeartbeatMessagefrom anInputStream.- Parameters:
input- theInputStreamto parse from.- Returns:
- a
HeartbeatMessageobject. - Throws:
java.io.IOException
-
-