Package org.eclipse.jgit.transport
Class NetRC
java.lang.Object
org.eclipse.jgit.transport.NetRC
NetRC file parser.
- Since:
- 3.5
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
.netrc file entry(package private) static enum
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final String
'default' netrc entry.private Map<String,
NetRC.NetRCEntry> private Instant
private File
(package private) static final Pattern
private static final TreeMap<String,
NetRC.State> -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
NETRC
-
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:
-
netrc
-
lastModified
-
hosts
-
STATE
-
-
Constructor Details
-
NetRC
public NetRC()Constructor for NetRC.
-
NetRC
Constructor for NetRC.
- Parameters:
netrc
- the .netrc file
-
-
Method Details
-
getDefaultFile
-
getEntry
Get entry by host name- Parameters:
host
- the host name- Returns:
- entry associated with host name or null
-
getEntries
Get all entries collected from .netrc file- Returns:
- all entries collected from .netrc file
-
parse
private void parse()
-