public class URLAndHash extends Object
Modifier and Type | Field and Description |
---|---|
protected byte[] |
sha1Hash |
protected String |
url |
Constructor and Description |
---|
URLAndHash(String url,
byte[] sha1Hash) |
Modifier and Type | Method and Description |
---|---|
void |
encode(OutputStream output)
Encode this
URLAndHash to an OutputStream . |
byte[] |
getSHA1Hash() |
String |
getURL() |
static URLAndHash |
parse(TlsContext context,
InputStream input)
Parse a
URLAndHash from an InputStream . |
protected String url
protected byte[] sha1Hash
public URLAndHash(String url, byte[] sha1Hash)
public String getURL()
public byte[] getSHA1Hash()
public void encode(OutputStream output) throws IOException
URLAndHash
to an OutputStream
.output
- the OutputStream
to encode to.IOException
public static URLAndHash parse(TlsContext context, InputStream input) throws IOException
URLAndHash
from an InputStream
.context
- the TlsContext
of the current connection.input
- the InputStream
to parse from.URLAndHash
object.IOException