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

org.bouncycastle.crypto.tls

## Class URLAndHash

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

-     public class URLAndHash
      extends java.lang.Object

  RFC 6066 5.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected byte[]` | `sha1Hash`
    `protected java.lang.String` | `url`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `URLAndHash(java.lang.String url, byte[] sha1Hash)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `encode(java.io.OutputStream output)` Encode this `URLAndHash` to an `OutputStream`.
    `byte[]` | `getSHA1Hash()`
    `java.lang.String` | `getURL()`
    `static URLAndHash` | `parse(TlsContext context, java.io.InputStream input)` Parse a `URLAndHash` from an `InputStream`.

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

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

- - ### Field Detail

    - #### url

          protected java.lang.String url

    - #### sha1Hash

          protected byte[] sha1Hash

  - ### Constructor Detail

    - #### URLAndHash

          public URLAndHash(java.lang.String url,
                    byte[] sha1Hash)

  - ### Method Detail

    - #### getURL

          public java.lang.String getURL()

    - #### getSHA1Hash

          public byte[] getSHA1Hash()

    - #### encode

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

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

    - #### parse

          public static URLAndHash parse(TlsContext context,
                         java.io.InputStream input)
                                  throws java.io.IOException

      Parse a `URLAndHash` from an `InputStream`.
      Parameters:
        `context` - the `TlsContext` of the current connection.
        `input` - the `InputStream` to parse from.
      Returns:
        a `URLAndHash` object.
      Throws:
        `java.io.IOException`