public class NetRC
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
NetRC.NetRCEntry
.netrc file entry
|
(package private) static class |
NetRC.State |
Modifier and Type | Field and Description |
---|---|
(package private) static java.lang.String |
DEFAULT_ENTRY
'default' netrc entry.
|
private java.util.Map<java.lang.String,NetRC.NetRCEntry> |
hosts |
private java.time.Instant |
lastModified |
private java.io.File |
netrc |
(package private) static java.util.regex.Pattern |
NETRC |
private static java.util.TreeMap<java.lang.String,NetRC.State> |
STATE |
Constructor and Description |
---|
NetRC()
Constructor for NetRC.
|
NetRC(java.io.File netrc)
Constructor for NetRC.
|
Modifier and Type | Method and Description |
---|---|
private static java.io.File |
getDefaultFile() |
java.util.Collection<NetRC.NetRCEntry> |
getEntries()
Get all entries collected from .netrc file
|
NetRC.NetRCEntry |
getEntry(java.lang.String host)
Get entry by host name
|
private void |
parse() |
static final java.util.regex.Pattern NETRC
static final java.lang.String DEFAULT_ENTRY
private java.io.File netrc
private java.time.Instant lastModified
private java.util.Map<java.lang.String,NetRC.NetRCEntry> hosts
private static final java.util.TreeMap<java.lang.String,NetRC.State> STATE
public NetRC()
Constructor for NetRC.
public NetRC(java.io.File netrc)
Constructor for NetRC.
netrc
- the .netrc fileprivate static java.io.File getDefaultFile()
public NetRC.NetRCEntry getEntry(java.lang.String host)
host
- the host namepublic java.util.Collection<NetRC.NetRCEntry> getEntries()
private void parse()