class HostTxtParser
extends java.lang.Object
コンストラクタ | 説明 |
---|---|
HostTxtParser() |
修飾子とタイプ | メソッド | 説明 |
---|---|---|
static void |
main(java.lang.String[] args) |
Usage: HostTxtParser [-q] validate example.i2p=b64dest[#!key1=val1#key2=val2]
|
static java.util.Map<java.lang.String,HostTxtEntry> |
parse(java.io.File file) |
Return a Map using the contents of the File file.
|
static java.util.Map<java.lang.String,HostTxtEntry> |
parse(java.io.File file,
java.util.Map<java.lang.String,HostTxtEntry> map) |
Return a Map using the contents of the File file.
|
static HostTxtEntry |
parse(java.lang.String inputLine,
boolean allowCommandOnly) |
Return a HostTxtEntry from the contents of the inputLine.
|
static void |
write(java.util.Map<java.lang.String,HostTxtEntry> map,
java.io.File file) |
Write contents of Map map to the File file.
|
public static HostTxtEntry parse(java.lang.String inputLine, boolean allowCommandOnly)
inputLine
- key=value[#!k1=v1#k2=v2...]allowCommandOnly
- if true, a line starting with #! will return
a HostTxtEntry with a null name and dest and non-null props.
If false, these lines will return null.public static java.util.Map<java.lang.String,HostTxtEntry> parse(java.io.File file) throws java.io.IOException
file
- A File to parse.java.io.IOException
- if file cannot be read.public static java.util.Map<java.lang.String,HostTxtEntry> parse(java.io.File file, java.util.Map<java.lang.String,HostTxtEntry> map)
file
- A File to attempt to parse.map
- A Map containing values to use as defaults.public static void write(java.util.Map<java.lang.String,HostTxtEntry> map, java.io.File file) throws java.io.IOException
map
- A Map to write to file.file
- A File to write the Map to.java.io.IOException
- if file cannot be written to.public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception