HttpURLConnectionclass SetInstanceFollowRedirects() method example. This example shows you how to use SetInstanceFollowRedirects() method.This method Sets whether HTTP redirects (requests with response code 3xx) should be automatically followed by this HttpURLConnection instance.
HttpURLConnectionclass SetFollowRedirects() method example. This example shows you how to use SetFollowRedirects() method.This method Sets whether HTTP redirects (requests with response code 3xx) should be automatically followed by this class.
HttpURLConnectionclass SetFixedLengthStreamingMode() method example. This example shows you how to use SetFixedLengthStreamingMode() method.This method is used to enable streaming of a HTTP request body without internal buffering, when the content length is known in advance.
HttpURLConnectionclass SetChunkedStreamingMode() method example. This example shows you how to use SetChunkedStreamingMode() method.This method is used to enable streaming of a HTTP request body without internal buffering, when the content length is not known in advance.
HttpURLConnectionclass GetResponseMessage() method example. This example shows you how to use GetResponseMessage() method.This method Gets the HTTP response message, if any, returned along with the response code from a server.
HttpURLConnectionclass GetResponseCode() method example. This example shows you how to use GetResponseCode() method.This method Gets the status code from an HTTP response message.
HttpURLConnectionclass GetRequestMethod() method example. This example shows you how to use GetRequestMethod() method.This method Get the request method
HttpURLConnectionclass GetPermission() method example. This example shows you how to use GetPermission() method.This method Returns a permission object representing the permission necessary to make the connection represented by this object.
HttpURLConnectionclass GetInstanceFollowRedirects() method example. This example shows you how to use GetInstanceFollowRedirects() method.This method Returns the value of this HttpURLConnection's instanceFollowRedirects field.
HttpURLConnectionclass GetHeaderFieldKey() method example. This example shows you how to use GetHeaderFieldKey() method.This method Returns the key for the nth header field
HttpURLConnectionclass GetHeaderFieldDate() method example. This example shows you how to use GetHeaderFieldDate() method.This method Returns the value of the named field parsed as date
HttpURLConnectionclass GetHeaderField() method example. This example shows you how to use GetHeaderField() method.This method Returns the value for the nth header field.
HttpURLConnectionclass GetFollowRedirects() method example. This example shows you how to use GetFollowRedirects() method.This method Returns a boolean indicating whether or not HTTP redirects (3xx) should be automatically followed.
HttpURLConnectionclass GetErrorStream() method example. This example shows you how to use GetErrorStream() method.This method Returns the error stream if the connection failed but the server sent useful data nonetheless.
NetworkInterface class toString example. public String toString() Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object.
NetworkInterface class supportsMulticast example. public boolean supportsMulticast() throws SocketException Returns whether a network interface supports multicasting or not.
NetworkInterface class isVirtual example. public boolean isVirtual() Returns whether this interface is a virtual interface (also called subinterface). Virtual interfaces are, on some systems, interfaces created as a child of a physical interface and given different settings (like address or MTU).
NetworkInterface class isPointToPoint example. public boolean isPointToPoint() throws SocketException Returns whether a network interface is a point to point interface. A typical point to point interface would be a PPP connection through a modem.
NetworkInterface class isLoopback example. public boolean isLoopback() throws SocketException Returns whether a network interface is a loopback interface.
NetworkInterface class hashCode example. public int hashCode() Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.
NetworkInterface class getSubInterfaces example.public Enumeration getSubInterfaces() Get an Enumeration with all the subinterfaces (also known as virtual interfaces) attached to this network interface. For instance eth0:1 will be a subinterface to eth0.
NetworkInterface class getParent example. public NetworkInterface getParent() Returns the parent NetworkInterface of this interface if this is a subinterface, or null if it is a physical (non virtual) interface or has no parent.
NetworkInterface class getNetworkInterfaces example. public static Enumeration getNetworkInterfaces() throws SocketException Returns all the interfaces on this machine. Returns null if no network interfaces could be found on this machine. NOTE: can use getNetworkInterfaces()+getInetAddresses() to obtain all IP addresses for this node
NetworkInterface class getInterfaceAddresses example. public List getInterfaceAddresses() Get a List of all or a subset of the InterfaceAddresses of this network interface.
NetworkInterface class getInetAddresses example. public Enumeration getInetAddresses() Convenience method to return an Enumeration with all or a subset of the InetAddresses bound to this network interface.
NetworkInterface class getDisplayName example. public String getDisplayName() Get the display name of this network interface. A display name is a human readable String describing the network device.