HeartbeatExtension (Bouncy Castle Library 1.54 API Specification)
Date: 2015-12-29

org.bouncycastle.crypto.tls

## Class HeartbeatExtension

- java.lang.Object
- - org.bouncycastle.crypto.tls.HeartbeatExtension

-     public class HeartbeatExtension
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected short` | `mode`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HeartbeatExtension(short mode)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `encode(java.io.OutputStream output)` Encode this `HeartbeatExtension` to an `OutputStream`.
    `short` | `getMode()`
    `static HeartbeatExtension` | `parse(java.io.InputStream input)` Parse a `HeartbeatExtension` from an `InputStream`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### mode

          protected short mode

  - ### Constructor Detail

    - #### HeartbeatExtension

          public HeartbeatExtension(short mode)

  - ### Method Detail

    - #### getMode

          public short getMode()

    - #### encode

          public void encode(java.io.OutputStream output)
                      throws java.io.IOException

      Encode this `HeartbeatExtension` to an `OutputStream`.
      Parameters:
        `output` - the `OutputStream` to encode to.
      Throws:
        `java.io.IOException`

    - #### parse

          public static HeartbeatExtension parse(java.io.InputStream input)
                                          throws java.io.IOException

      Parse a `HeartbeatExtension` from an `InputStream`.
      Parameters:
        `input` - the `InputStream` to parse from.
      Returns:
        a `HeartbeatExtension` object.
      Throws:
        `java.io.IOException`