- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for parseShort (0.29 sec)
-
src/main/java/org/codelibs/core/convert/ShortConversionUtil.java
} else if (o instanceof String) { return toPrimitiveShort((String) o); } else if (o instanceof java.util.Date) { if (pattern != null) { return Short.parseShort(new SimpleDateFormat(pattern).format(o)); } return (short) ((java.util.Date) o).getTime(); } else if (o instanceof Boolean) { return ((Boolean) o) ? (short) 1 : (short) 0;
Registered: Wed Jun 12 12:50:12 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 3.8K bytes - Viewed (0) -
cmd/kubeadm/app/util/endpoint.go
} // ParsePort parses a string representing a TCP port. // If the string is not a valid representation of a TCP port, ParsePort returns an error. func ParsePort(port string) (int, error) { portInt, err := netutils.ParsePort(port, true) if err == nil && (1 <= portInt && portInt <= 65535) { return portInt, nil }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jan 11 15:08:59 UTC 2022 - 5.3K bytes - Viewed (0) -
guava/src/com/google/common/net/HostSpecifier.java
// Verify that no port was specified, and strip optional brackets from // IPv6 literals. HostAndPort parsedHost = HostAndPort.fromString(specifier); Preconditions.checkArgument(!parsedHost.hasPort()); String host = parsedHost.getHost(); // Try to interpret the specifier as an IP address. Note we build // the address rather than using the .is* methods because we want to
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Apr 05 09:18:40 UTC 2023 - 6K bytes - Viewed (0) -
src/net/port_test.go
} func TestParsePort(t *testing.T) { // The following test cases are cribbed from the strconv for _, tt := range parsePortTests { if port, needsLookup := parsePort(tt.service); port != tt.port || needsLookup != tt.needsLookup { t.Errorf("parsePort(%q) = %d, %t; want %d, %t", tt.service, port, needsLookup, tt.port, tt.needsLookup) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 15 23:11:47 UTC 2016 - 1.3K bytes - Viewed (0) -
src/net/port.go
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package net // parsePort parses service as a decimal integer and returns the // corresponding value as port. It is the caller's responsibility to // parse service as a non-decimal integer when needsLookup is true. // // Some system resolvers will return a valid port number when given a number
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 21 17:31:56 UTC 2017 - 1.5K bytes - Viewed (0) -
pkg/kube/inject/validate.go
return validatePortList("excludeOutboundPorts", ports) } // validateStatusPort validates the statusPort parameter func validateStatusPort(port string) error { if _, e := parsePort(port); e != nil { return fmt.Errorf("excludeInboundPorts invalid: %v", e) } return nil } // validateUInt32 validates that the given annotation value is a positive integer.
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Apr 17 20:06:41 UTC 2024 - 5.9K bytes - Viewed (0) -
android/guava/src/com/google/common/net/HostSpecifier.java
// Verify that no port was specified, and strip optional brackets from // IPv6 literals. HostAndPort parsedHost = HostAndPort.fromString(specifier); Preconditions.checkArgument(!parsedHost.hasPort()); String host = parsedHost.getHost(); // Try to interpret the specifier as an IP address. Note we build // the address rather than using the .is* methods because we want to
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Apr 05 09:18:40 UTC 2023 - 6K bytes - Viewed (0) -
cmd/net.go
var localIP4 = mustGetLocalIP4() // mustSplitHostPort is a wrapper to net.SplitHostPort() where error is assumed to be a fatal. func mustSplitHostPort(hostPort string) (host, port string) { xh, err := xnet.ParseHost(hostPort) if err != nil { logger.FatalIf(err, "Unable to split host port %s", hostPort) } return xh.Name, xh.Port.String() } // mustGetLocalIPs returns IPs of local interface
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 9.3K bytes - Viewed (0) -
cmd/consolelogger.go
func (sys *HTTPConsoleLoggerSys) SetNodeName(nodeName string) { if !globalIsDistErasure { sys.nodeName = "" return } host, err := xnet.ParseHost(globalLocalNodeName) if err != nil { logger.FatalIf(err, "Unable to start console logging subsystem") } sys.nodeName = host.Name } // HasLogListeners returns true if console log listeners are registered
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 5.5K bytes - Viewed (0) -
pkg/util/flag/flags.go
return fmt.Errorf("%q is not in a valid format (ip or ip:port): %v", s, err) } if netutils.ParseIPSloppy(host) == nil { return fmt.Errorf("%q is not a valid IP address", host) } if _, err := netutils.ParsePort(port, true); err != nil { return fmt.Errorf("%q is not a valid number", port) } *v.Val = s return nil } // String returns the flag value func (v *IPPortVar) String() string { if v.Val == nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jul 19 03:30:46 UTC 2022 - 7.8K bytes - Viewed (0)