public class SURT extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
BEGIN_TRANSFORMED_AUTHORITY |
protected static char |
DOT |
protected static String |
END_TRANSFORMED_AUTHORITY |
protected static String |
TRANSFORMED_HOST_DELIM |
protected static String |
URI_SPLITTER |
| Constructor and Description |
|---|
SURT() |
| Modifier and Type | Method and Description |
|---|---|
static String |
fromPlain(String u)
Given a plain URI or hostname/hostname+path, give its SURT form.
|
static String |
fromURI(String s)
Utility method for creating the SURT form of the URI in the
given String.
|
static String |
fromURI(String s,
boolean preserveCase)
Utility method for creating the SURT form of the URI in the
given String.
|
static void |
main(String[] args)
Allow class to be used as a command-line tool for converting
URL lists (or naked host or host/path fragments implied
to be HTTP URLs) to SURT form.
|
static String |
prefixFromPlain(String u)
Given a plain URI or hostname/hostname+path, deduce an implied SURT
prefix from it.
|
protected static char DOT
protected static String BEGIN_TRANSFORMED_AUTHORITY
protected static String TRANSFORMED_HOST_DELIM
protected static String END_TRANSFORMED_AUTHORITY
protected static String URI_SPLITTER
public static String fromURI(String s)
s - String URI to be converted to SURT formpublic static String fromURI(String s, boolean preserveCase)
s - String URI to be converted to SURT formpreserveCase - whether original case should be preservedpublic static String prefixFromPlain(String u)
u - URI or almost-URI to considerpublic static String fromPlain(String u)
u - URI or almost-URI to considerpublic static void main(String[] args) throws IOException
args - cmd-line argumentsIOExceptionCopyright © 2015 The International Internet Preservation Consortium. All Rights Reserved.