{"id":220,"date":"2021-11-02T19:47:29","date_gmt":"2021-11-02T19:47:29","guid":{"rendered":"https:\/\/ouritsource.com\/blog\/?p=220"},"modified":"2021-11-02T20:27:23","modified_gmt":"2021-11-02T20:27:23","slug":"how-to-open-and-read-from-a-url-in-java-with-just-the-url-class","status":"publish","type":"post","link":"https:\/\/ouritsource.com\/blog\/how-to-open-and-read-from-a-url-in-java-with-just-the-url-class\/","title":{"rendered":"How to open and read from a URL in Java (with just the URL class)"},"content":{"rendered":"<body>\n<p>This example shows how to read a file from a URL using Reader class. Reference: Alexander, Alvin (2016). How to open and read from a URL in Java (with just the URL class). Retrieved from \/\/https:\/\/alvinalexander.com\/blog\/post\/java\/how-open-read-url-java-url-class-example-code<\/p>\n\n\n\n<div style=\"width:100%; padding-bottom:56.25%; position:relative;\">\n  <iframe src=\"https:\/\/www.ouritsource.com\/apps\/codingexamples\/showcode.php?ref=54\" style=\"position:absolute; top:0px; left:0px; \n  width:100%; height:100%; border: none; overflow: hidden;\"><\/iframe>\n<\/div>\n<\/body>","protected":false},"excerpt":{"rendered":"<p>This example shows how to read a file from a URL using Reader class. Reference: Alexander, Alvin (2016). How to open and read from a URL in Java (with just the URL&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-220","post","type-post","status-publish","format-standard","hentry","category-java","no-thumbnail"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/posts\/220","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/comments?post=220"}],"version-history":[{"count":1,"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/posts\/220\/revisions"}],"predecessor-version":[{"id":221,"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/posts\/220\/revisions\/221"}],"wp:attachment":[{"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/media?parent=220"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/categories?post=220"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/tags?post=220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}