Package org.eclipse.jgit.transport
Class NetRC
- java.lang.Object
-
- org.eclipse.jgit.transport.NetRC
-
public class NetRC extends java.lang.ObjectNetRC file parser.- Since:
- 3.5
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNetRC.NetRCEntry.netrc file entry(package private) static classNetRC.State
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.lang.StringDEFAULT_ENTRY'default' netrc entry.private java.util.Map<java.lang.String,NetRC.NetRCEntry>hostsprivate java.time.InstantlastModifiedprivate java.io.Filenetrc(package private) static java.util.regex.PatternNETRCprivate static java.util.TreeMap<java.lang.String,NetRC.State>STATE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.io.FilegetDefaultFile()java.util.Collection<NetRC.NetRCEntry>getEntries()Get all entries collected from .netrc fileNetRC.NetRCEntrygetEntry(java.lang.String host)Get entry by host nameprivate voidparse()
-
-
-
Field Detail
-
NETRC
static final java.util.regex.Pattern NETRC
-
DEFAULT_ENTRY
static final java.lang.String DEFAULT_ENTRY
'default' netrc entry. This is the same as machine name except that default matches any name. There can be only one default token, and it must be after all machine tokens.- See Also:
- Constant Field Values
-
netrc
private java.io.File netrc
-
lastModified
private java.time.Instant lastModified
-
hosts
private java.util.Map<java.lang.String,NetRC.NetRCEntry> hosts
-
STATE
private static final java.util.TreeMap<java.lang.String,NetRC.State> STATE
-
-
Method Detail
-
getDefaultFile
private static java.io.File getDefaultFile()
-
getEntry
public NetRC.NetRCEntry getEntry(java.lang.String host)
Get entry by host name- Parameters:
host- the host name- Returns:
- entry associated with host name or null
-
getEntries
public java.util.Collection<NetRC.NetRCEntry> getEntries()
Get all entries collected from .netrc file- Returns:
- all entries collected from .netrc file
-
parse
private void parse()
-
-