{"id":25524014,"date":"2022-05-21T19:34:33","date_gmt":"2022-05-21T14:04:33","guid":{"rendered":"https:\/\/entri.app\/blog\/?p=25524014"},"modified":"2022-11-20T06:39:07","modified_gmt":"2022-11-20T01:09:07","slug":"learn-about-file-handling-in-java","status":"publish","type":"post","link":"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/","title":{"rendered":"Learn About File Handling in Java"},"content":{"rendered":"<p>Java is one of the most popular programming languages that provides extensive support to various functionalities like databases, sockets, etc. One such functionality is File Handling in Java. File Handling is necessary to perform various tasks on a file, such as reading, writing, etc. In this article, I will tell you what are the various file operations in Java.<\/p>\n<h2><strong>What is File Handling in Java?<\/strong><\/h2>\n<p><span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;file handling in java, file class in java, java file handling&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:12478,&quot;4&quot;:{&quot;1&quot;:2,&quot;2&quot;:16777215},&quot;5&quot;:{&quot;1&quot;:[{&quot;1&quot;:2,&quot;2&quot;:0,&quot;5&quot;:{&quot;1&quot;:2,&quot;2&quot;:0}},{&quot;1&quot;:0,&quot;2&quot;:0,&quot;3&quot;:3},{&quot;1&quot;:1,&quot;2&quot;:0,&quot;4&quot;:1}]},&quot;6&quot;:{&quot;1&quot;:[{&quot;1&quot;:2,&quot;2&quot;:0,&quot;5&quot;:{&quot;1&quot;:2,&quot;2&quot;:0}},{&quot;1&quot;:0,&quot;2&quot;:0,&quot;3&quot;:3},{&quot;1&quot;:1,&quot;2&quot;:0,&quot;4&quot;:1}]},&quot;7&quot;:{&quot;1&quot;:[{&quot;1&quot;:2,&quot;2&quot;:0,&quot;5&quot;:{&quot;1&quot;:2,&quot;2&quot;:0}},{&quot;1&quot;:0,&quot;2&quot;:0,&quot;3&quot;:3},{&quot;1&quot;:1,&quot;2&quot;:0,&quot;4&quot;:1}]},&quot;8&quot;:{&quot;1&quot;:[{&quot;1&quot;:2,&quot;2&quot;:0,&quot;5&quot;:{&quot;1&quot;:2,&quot;2&quot;:0}},{&quot;1&quot;:0,&quot;2&quot;:0,&quot;3&quot;:3},{&quot;1&quot;:1,&quot;2&quot;:0,&quot;4&quot;:1}]},&quot;10&quot;:2,&quot;15&quot;:&quot;\\&quot;Helvetica Neue\\&quot;&quot;,&quot;16&quot;:11}\">Java file handling<\/span>\u00a0implies reading from and writing data to a file. The File class from the java.io package, allows us to work with different formats of files. In order to use the File class, you need to create an object of the\u00a0class\u00a0and specify the filename or directory name.<\/p>\n<p style=\"text-align: center;\"><strong><a href=\"https:\/\/bit.ly\/3ELmCiA\" target=\"_blank\" rel=\"noopener\">Learn Coding in your Language! Enroll Here!<\/a><\/strong><\/p>\n<h3><strong>Why File Handling is Required?<\/strong><\/h3>\n<ul>\n<li><span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;file handling in java, file class in java, java file handling&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:12478,&quot;4&quot;:{&quot;1&quot;:2,&quot;2&quot;:16777215},&quot;5&quot;:{&quot;1&quot;:[{&quot;1&quot;:2,&quot;2&quot;:0,&quot;5&quot;:{&quot;1&quot;:2,&quot;2&quot;:0}},{&quot;1&quot;:0,&quot;2&quot;:0,&quot;3&quot;:3},{&quot;1&quot;:1,&quot;2&quot;:0,&quot;4&quot;:1}]},&quot;6&quot;:{&quot;1&quot;:[{&quot;1&quot;:2,&quot;2&quot;:0,&quot;5&quot;:{&quot;1&quot;:2,&quot;2&quot;:0}},{&quot;1&quot;:0,&quot;2&quot;:0,&quot;3&quot;:3},{&quot;1&quot;:1,&quot;2&quot;:0,&quot;4&quot;:1}]},&quot;7&quot;:{&quot;1&quot;:[{&quot;1&quot;:2,&quot;2&quot;:0,&quot;5&quot;:{&quot;1&quot;:2,&quot;2&quot;:0}},{&quot;1&quot;:0,&quot;2&quot;:0,&quot;3&quot;:3},{&quot;1&quot;:1,&quot;2&quot;:0,&quot;4&quot;:1}]},&quot;8&quot;:{&quot;1&quot;:[{&quot;1&quot;:2,&quot;2&quot;:0,&quot;5&quot;:{&quot;1&quot;:2,&quot;2&quot;:0}},{&quot;1&quot;:0,&quot;2&quot;:0,&quot;3&quot;:3},{&quot;1&quot;:1,&quot;2&quot;:0,&quot;4&quot;:1}]},&quot;10&quot;:2,&quot;15&quot;:&quot;\\&quot;Helvetica Neue\\&quot;&quot;,&quot;16&quot;:11}\">File handling in java<\/span>\u00a0is an integral part of any programming language as file handling enables us to store the output of any particular program in a file and allows us to perform certain operations on it.<\/li>\n<li>In simple words, file handling means reading and writing data to a file.<\/li>\n<\/ul>\n<h4><strong>Streams in Java<\/strong><\/h4>\n<p>In Java, a sequence of data is known as a stream. This concept is used to perform I\/O operations i.e, Input and Output on a file. There are two types of streams in this.<\/p>\n<p><strong>Input Stream<\/strong><\/p>\n<p>The Java InputStream class is the superclass of all input streams. The input stream is used to read data from numerous input devices like the keyboard, network, etc.<\/p>\n<table dir=\"ltr\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<colgroup>\n<col width=\"100\" \/>\n<col width=\"100\" \/>\n<col width=\"100\" \/><\/colgroup>\n<tbody>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;S No.&quot;}\"><strong>S No.<\/strong><\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Method&quot;}\"><strong>Method<\/strong><\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Description&quot;}\"><strong>Description<\/strong><\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:1}\">1<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;read()&quot;}\">read()<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Reads one byte of data from the input stream.&quot;}\">\n<div>\n<div>Reads one byte of data from the input stream.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:2}\">2<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;read(byte[] array)()&quot;}\">read(byte[] array)()<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Reads byte from the stream and stores that byte in the specified array.&quot;}\">\n<div>\n<div>Reads byte from the stream and stores that byte in the specified array.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:3}\">3<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;mark()&quot;}\">mark()<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;It marks the position in the input stream until the data has been read.&quot;}\">\n<div>\n<div>It marks the position in the input stream until the data has been read.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:4}\">4<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;available()&quot;}\">available()<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Returns the number of bytes available in the input stream.&quot;}\">\n<div>\n<div>Returns the number of bytes available in the input stream.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:5}\">5<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;markSupported()&quot;}\">markSupported()<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;It checks if the mark() method and the reset() method is supported in the stream.&quot;}\">\n<div>\n<div>It checks if the mark() method and the reset() method is supported in the stream.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:6}\">6<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;reset()&quot;}\">reset()<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Returns the control to the point where the mark was set inside the stream.&quot;}\">\n<div>\n<div>Returns the control to the point where the mark was set inside the stream.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:7}\">7<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;skips()&quot;}\">skips()<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Skips and removes a particular number of bytes from the input stream.&quot;}\">\n<div>\n<div>Skips and removes a particular number of bytes from the input stream.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:8}\">8<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;close()&quot;}\">close()<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Closes the input stream.&quot;}\">\n<div>\n<div>Closes the input stream.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: center;\"><strong><a href=\"https:\/\/bit.ly\/3ELmCiA\" target=\"_blank\" rel=\"noopener\">Learn to code from industry experts! Enroll here<\/a><\/strong><\/p>\n<p><strong>Output Stream<\/strong><\/p>\n<p>The output stream is used to write data to numerous output devices like the monitor, file, etc. OutputStream is an abstract superclass that represents an output stream.<\/p>\n<table dir=\"ltr\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<colgroup>\n<col width=\"100\" \/>\n<col width=\"100\" \/>\n<col width=\"100\" \/><\/colgroup>\n<tbody>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;S. No.&quot;}\"><strong>S. No.<\/strong><\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Method&quot;}\"><strong>Method<\/strong><\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Description&quot;}\"><strong>Description<\/strong><\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:1}\">1<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;write()&quot;}\">write()<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Writes the specified byte to the output stream.&quot;}\">\n<div>\n<div>Writes the specified byte to the output stream.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:2}\">2<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;write(byte[] array)&quot;}\">write(byte[] array)<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Writes the bytes which are inside a specific array to the output stream.&quot;}\">\n<div>\n<div>Writes the bytes which are inside a specific array to the output stream.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:3}\">3<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;close()&quot;}\">close()<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Closes the output stream.&quot;}\">\n<div>\n<div>Closes the output stream.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:4}\">4<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;flush()&quot;}\">flush()<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Forces to write all the data present in an output stream to the destination.&quot;}\">\n<div>\n<div>Forces to write all the data present in an output stream to the destination.<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Based on the data type, there are two types of streams :<\/strong><\/p>\n<p><strong>1. Byte Stream:<\/strong><\/p>\n<p>This stream is used to read or write byte data. The byte stream is again subdivided into two types which are as follows:<\/p>\n<ul>\n<li>Byte Input Stream:\u00a0Used to read byte data from different devices.<\/li>\n<li>Byte Output Stream:\u00a0Used to write byte data to different devices.<\/li>\n<\/ul>\n<p><strong>2. Character Stream:<\/strong><\/p>\n<p>This stream is used to read or write character data. Character stream is again subdivided into 2 types which are as follows:<\/p>\n<ul>\n<li>Character Input Stream:\u00a0Used to read character data from different devices.<\/li>\n<li>Character Output Stream:\u00a0Used to write character data to different devices.<\/li>\n<\/ul>\n<p>In Java, with the help of File Class, we can work with files. This File Class is inside the java.io package. The File class can be used by creating an object of the class and then specifying the name of the file.<\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/bit.ly\/3ELmCiA\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-25520910 size-full\" src=\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square.png\" alt=\"Python and Machine Learning Square\" width=\"345\" height=\"345\" srcset=\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square.png 345w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-300x300.png 300w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-150x150.png 150w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-24x24.png 24w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-48x48.png 48w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-96x96.png 96w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-75x75.png 75w\" sizes=\"auto, (max-width: 345px) 100vw, 345px\" \/><\/a><\/p>\n<p>Entri provides video classes as well on various important topics by the excellent faculties. One will get revision modules, monthly tests based on the classes. You will be provided with an online platform to prepare for the exam. It also gives you access to clarify your doubts.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Java is one of the most popular programming languages that provides extensive support to various functionalities like databases, sockets, etc. One such functionality is File Handling in Java. File Handling is necessary to perform various tasks on a file, such as reading, writing, etc. In this article, I will tell you what are the various [&hellip;]<\/p>\n","protected":false},"author":81,"featured_media":25524015,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[802,1864,1865,1882,1883],"tags":[],"class_list":["post-25524014","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-articles","category-data-science-ml","category-digital-marketing","category-java-programming","category-react-native"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Learn About File Handling in Java - Entri Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Learn About File Handling in Java - Entri Blog\" \/>\n<meta property=\"og:description\" content=\"Java is one of the most popular programming languages that provides extensive support to various functionalities like databases, sockets, etc. One such functionality is File Handling in Java. File Handling is necessary to perform various tasks on a file, such as reading, writing, etc. In this article, I will tell you what are the various [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/\" \/>\n<meta property=\"og:site_name\" content=\"Entri Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/entri.me\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-05-21T14:04:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-20T01:09:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/05\/generic-blog-thumbnail-21-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"820\" \/>\n\t<meta property=\"og:image:height\" content=\"615\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Shibani Ghosh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@entri_app\" \/>\n<meta name=\"twitter:site\" content=\"@entri_app\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Shibani Ghosh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/\"},\"author\":{\"name\":\"Shibani Ghosh\",\"@id\":\"https:\/\/entri.app\/blog\/#\/schema\/person\/2cfbd0a262fb36f55cb1d95bfc5944b5\"},\"headline\":\"Learn About File Handling in Java\",\"datePublished\":\"2022-05-21T14:04:33+00:00\",\"dateModified\":\"2022-11-20T01:09:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/\"},\"wordCount\":638,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/entri.app\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/05\/generic-blog-thumbnail-21-1.png\",\"articleSection\":[\"Articles\",\"Data Science and Machine Learning\",\"Digital Marketing\",\"Java Programming\",\"React Native\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/\",\"url\":\"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/\",\"name\":\"Learn About File Handling in Java - Entri Blog\",\"isPartOf\":{\"@id\":\"https:\/\/entri.app\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/05\/generic-blog-thumbnail-21-1.png\",\"datePublished\":\"2022-05-21T14:04:33+00:00\",\"dateModified\":\"2022-11-20T01:09:07+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/#primaryimage\",\"url\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/05\/generic-blog-thumbnail-21-1.png\",\"contentUrl\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/05\/generic-blog-thumbnail-21-1.png\",\"width\":820,\"height\":615},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/entri.app\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Entri Skilling\",\"item\":\"https:\/\/entri.app\/blog\/category\/entri-skilling\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Java Programming\",\"item\":\"https:\/\/entri.app\/blog\/category\/entri-skilling\/java-programming\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Learn About File Handling in Java\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/entri.app\/blog\/#website\",\"url\":\"https:\/\/entri.app\/blog\/\",\"name\":\"Entri Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/entri.app\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/entri.app\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/entri.app\/blog\/#organization\",\"name\":\"Entri App\",\"url\":\"https:\/\/entri.app\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/entri.app\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2019\/10\/Entri-Logo-1.png\",\"contentUrl\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2019\/10\/Entri-Logo-1.png\",\"width\":989,\"height\":446,\"caption\":\"Entri App\"},\"image\":{\"@id\":\"https:\/\/entri.app\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/entri.me\/\",\"https:\/\/x.com\/entri_app\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/entri.app\/blog\/#\/schema\/person\/2cfbd0a262fb36f55cb1d95bfc5944b5\",\"name\":\"Shibani Ghosh\",\"description\":\"Pouring out my thoughts through words!\",\"url\":\"https:\/\/entri.app\/blog\/author\/shibani\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Learn About File Handling in Java - Entri Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/","og_locale":"en_US","og_type":"article","og_title":"Learn About File Handling in Java - Entri Blog","og_description":"Java is one of the most popular programming languages that provides extensive support to various functionalities like databases, sockets, etc. One such functionality is File Handling in Java. File Handling is necessary to perform various tasks on a file, such as reading, writing, etc. In this article, I will tell you what are the various [&hellip;]","og_url":"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/","og_site_name":"Entri Blog","article_publisher":"https:\/\/www.facebook.com\/entri.me\/","article_published_time":"2022-05-21T14:04:33+00:00","article_modified_time":"2022-11-20T01:09:07+00:00","og_image":[{"width":820,"height":615,"url":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/05\/generic-blog-thumbnail-21-1.png","type":"image\/png"}],"author":"Shibani Ghosh","twitter_card":"summary_large_image","twitter_creator":"@entri_app","twitter_site":"@entri_app","twitter_misc":{"Written by":"Shibani Ghosh","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/#article","isPartOf":{"@id":"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/"},"author":{"name":"Shibani Ghosh","@id":"https:\/\/entri.app\/blog\/#\/schema\/person\/2cfbd0a262fb36f55cb1d95bfc5944b5"},"headline":"Learn About File Handling in Java","datePublished":"2022-05-21T14:04:33+00:00","dateModified":"2022-11-20T01:09:07+00:00","mainEntityOfPage":{"@id":"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/"},"wordCount":638,"commentCount":0,"publisher":{"@id":"https:\/\/entri.app\/blog\/#organization"},"image":{"@id":"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/#primaryimage"},"thumbnailUrl":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/05\/generic-blog-thumbnail-21-1.png","articleSection":["Articles","Data Science and Machine Learning","Digital Marketing","Java Programming","React Native"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/","url":"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/","name":"Learn About File Handling in Java - Entri Blog","isPartOf":{"@id":"https:\/\/entri.app\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/#primaryimage"},"image":{"@id":"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/#primaryimage"},"thumbnailUrl":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/05\/generic-blog-thumbnail-21-1.png","datePublished":"2022-05-21T14:04:33+00:00","dateModified":"2022-11-20T01:09:07+00:00","breadcrumb":{"@id":"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/#primaryimage","url":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/05\/generic-blog-thumbnail-21-1.png","contentUrl":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/05\/generic-blog-thumbnail-21-1.png","width":820,"height":615},{"@type":"BreadcrumbList","@id":"https:\/\/entri.app\/blog\/learn-about-file-handling-in-java\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/entri.app\/blog\/"},{"@type":"ListItem","position":2,"name":"Entri Skilling","item":"https:\/\/entri.app\/blog\/category\/entri-skilling\/"},{"@type":"ListItem","position":3,"name":"Java Programming","item":"https:\/\/entri.app\/blog\/category\/entri-skilling\/java-programming\/"},{"@type":"ListItem","position":4,"name":"Learn About File Handling in Java"}]},{"@type":"WebSite","@id":"https:\/\/entri.app\/blog\/#website","url":"https:\/\/entri.app\/blog\/","name":"Entri Blog","description":"","publisher":{"@id":"https:\/\/entri.app\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/entri.app\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/entri.app\/blog\/#organization","name":"Entri App","url":"https:\/\/entri.app\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/entri.app\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2019\/10\/Entri-Logo-1.png","contentUrl":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2019\/10\/Entri-Logo-1.png","width":989,"height":446,"caption":"Entri App"},"image":{"@id":"https:\/\/entri.app\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/entri.me\/","https:\/\/x.com\/entri_app"]},{"@type":"Person","@id":"https:\/\/entri.app\/blog\/#\/schema\/person\/2cfbd0a262fb36f55cb1d95bfc5944b5","name":"Shibani Ghosh","description":"Pouring out my thoughts through words!","url":"https:\/\/entri.app\/blog\/author\/shibani\/"}]}},"_links":{"self":[{"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/posts\/25524014","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/users\/81"}],"replies":[{"embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/comments?post=25524014"}],"version-history":[{"count":4,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/posts\/25524014\/revisions"}],"predecessor-version":[{"id":25547512,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/posts\/25524014\/revisions\/25547512"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/media\/25524015"}],"wp:attachment":[{"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/media?parent=25524014"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/categories?post=25524014"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/tags?post=25524014"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}