public class HeartbeatMessage
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
padding |
protected byte[] |
payload |
protected short |
type |
| Constructor and Description |
|---|
HeartbeatMessage(short type,
byte[] payload,
byte[] padding) |
| Modifier and Type | Method and Description |
|---|---|
static HeartbeatMessage |
create(TlsContext context,
short type,
byte[] payload) |
static HeartbeatMessage |
create(TlsContext context,
short type,
byte[] payload,
int paddingLength) |
void |
encode(java.io.OutputStream output)
Encode this
HeartbeatMessage to an OutputStream. |
int |
getPaddingLength() |
byte[] |
getPayload() |
short |
getType() |
static HeartbeatMessage |
parse(java.io.InputStream input)
Parse a
HeartbeatMessage from an InputStream. |
protected short type
protected byte[] payload
protected byte[] padding
public HeartbeatMessage(short type,
byte[] payload,
byte[] padding)
public static HeartbeatMessage create(TlsContext context, short type, byte[] payload)
public static HeartbeatMessage create(TlsContext context, short type, byte[] payload, int paddingLength)
public int getPaddingLength()
public byte[] getPayload()
public short getType()
public void encode(java.io.OutputStream output)
throws java.io.IOException
HeartbeatMessage to an OutputStream.output - the OutputStream to encode to.java.io.IOExceptionpublic static HeartbeatMessage parse(java.io.InputStream input) throws java.io.IOException
HeartbeatMessage from an InputStream.input - the InputStream to parse from.HeartbeatMessage object.java.io.IOException