Networking
- Which of these method is called when http daemon is acting like a normal web server?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
handleGet()
- Which of these method is used to start a server thread?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
run() method is called when the server thread is started.
- What is the output of this program?
import java.net.*;
public class networking_Length
{
public static void main(String[] args) throws Exception
{
URL object = new URL("https://www.interviewmania.com/java/programming");
URLConnection object0 = object.openConnection();
int length = object0.getContentLength();
System.out.print(length);
}
}
Note: Host URL is having length of content 256.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
256
- Which of these method of httpd class is used to write UrlCacheEntry object into local disk?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
The writeDiskCache() method takes an UrlCacheEntry object and writes it persistently into the local disk. It constructs directory names out of URL, making sure to replace the slash(/) characters with system dependent seperatorChar.
- Which of these variables stores the number of hits that are successfully served out of cache?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
hitstocache