Spread the love

Class UnknownServiceException in Java

Spread the love

Class UnknownServiceException in Java

UnknownServiceException is also common exception classes in java and is thrown from the application to indicate that an unknown service exception has occurred. when we try to get/call service and the service we requested of a particular network connection does not exist.

This is could be due to MIME type(Multipurpose Main Extension) returned by a URL connection does not valid or the application is attempting to write to a read-only URL connection.

In short, it signals an attempt to use an unsupported service of a network connection.A UnknownServiceException is thrown when an unrecognized service is requested, which can occur when the MIME type returned by a URLConnection does not match any recognized types.

The structure of the class UnknownServiceException is defined as :

public class java.io.UnknownServiceException extends java.lang.IOException{
public UnknownServiceException();
//constructs an empty UnknownServiceException object that is an object with no message specified.
public UnknownServiceException(String message);
//constructs an UnknownServiceException object with the message specified.

The class UnknownServiceException also inherits methods from class Object and Throwable.

From Object classFrom Throwable class
wait(long, int)getLocalizedMessage()

Spread the love
READ  How Memory Allocation Happens in Java?
READ  Class CheckedOutputStream in Java
Animesh Chatterjeehttps://techtravelhub.com/
I am the founder and owner of the blog - TechTravelHub.com, always love to share knowledge on test automation,tools,techniques and tips.I am a passionate coder of Java and VBScript.I also publish articles on Travel ideas and great honeymoon destinations.Apart from these, I am a gear-head,love to drive across India. I have shared lots of articles here on How to travel several parts of India.Customization of cars aka car modification is my another hobby.Get in touch with me on ani01104@gamil.com

Related Articles

Super Keyword in Java Simplified

Super Keyword Super Keyword in Java Simplified: Java defines a special keyword called...



Please enter your comment!
Please enter your name here

Recent Posts

Super Keyword in Java Simplified

Super Keyword Super Keyword in Java Simplified: Java defines a special...

Learn Object Repository in UFT in An Efficient and Fast Manner

Object Repository in UFT The post will cover the following...

Learn What Primary Tools For Test Automation

Primary Tools For Test Automation According to the Gartner report...


Spread the love